Skip to main content

Language server backing the NEML2 VS Code extension

Project description

NEML2 Language Support

VS Code extension providing language support for NEML2 input files.

Features

  • Completion — type names for type = assignments, and option names with inline type hints inside typed blocks
  • Hover documentation — docstrings for types and options shown on hover
  • Format on save — re-indents the document consistently via the nmhit formatter

Requirements

A Python environment with the neml2-langserv package installed:

pip install neml2-langserv

That single install pulls in everything the language server needs — neml2 (≥ 2.1.4) for the type/option metadata, nmhit (≥ 0.1.2) for the formatter, and pygls for the LSP transport.

The extension runs the server with whichever Python interpreter is selected in the Python extension. If neml2-langserv is not installed in that interpreter on first activation, the extension prompts you to install it.

Setup

NEML2 input files share the .i extension with MOOSE input files. To tell the extension that a file is a NEML2 input, add the following as the first line:

# neml2

Files without this marker are treated as MOOSE input (or plain text) and the NEML2 language server will not activate for them.

Format on save

Enable the built-in VS Code setting to auto-format on save:

// .vscode/settings.json
{
  "[neml2]": {
    "editor.formatOnSave": true
  }
}

MOOSE compatibility

This extension does not claim the .i extension globally, so existing MOOSE workflows are unaffected. Only files whose first line matches # neml2 (optionally followed by other text) are switched to the neml2 language mode.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

neml2_langserv-0.1.2.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

neml2_langserv-0.1.2-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file neml2_langserv-0.1.2.tar.gz.

File metadata

  • Download URL: neml2_langserv-0.1.2.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for neml2_langserv-0.1.2.tar.gz
Algorithm Hash digest
SHA256 c0e67fa2f9793685add5ddaa993cc444c7ce31cda44a603a9d3b1ee85f03a389
MD5 7e40653b99744e713f10d16112fb5726
BLAKE2b-256 350c5ed06c14396057bccea59d7a77fe7408acfd08191a0039af7096d943c601

See more details on using hashes here.

Provenance

The following attestation bundles were made for neml2_langserv-0.1.2.tar.gz:

Publisher: publish.yml on applied-material-modeling/neml2-langserv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file neml2_langserv-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: neml2_langserv-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for neml2_langserv-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3c44dd586ad5f79f7bf6ce6444e19ea43a60266bbbd6a76dcd8f7de6cf6ee285
MD5 1360407c4045b49409f90f59ffc6575d
BLAKE2b-256 74b28196a5431cdf8de81b82efac1ca929a99ecdb74d9fcb71cc1a0a52d9e994

See more details on using hashes here.

Provenance

The following attestation bundles were made for neml2_langserv-0.1.2-py3-none-any.whl:

Publisher: publish.yml on applied-material-modeling/neml2-langserv

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page