YANG Language Support using pyang.
This package can be used on Visual Studio Code, as well as any other Code - OSS and Theia derivatives that are compatible with VS Code Extension API.
Following features are provided directly by this Language Extension
- Syntax highlighting
- Comment toggling
- Brackets definition
- Autoclosing
- Autosurrounding
See: Syntax Highlight, Language Configuration
pyang
provides LSP based features for YANG, all of which are supported
by the extension, except pull diagnostics since it is not automatically
triggered.
See pyang
documentation corresponding to installation for expected features.
See: Programmatic Language Features, Language Server Extension Guide
The extension requires a pyang
version installation that supports LSP. At the
time of writing, only a work in progress pyang
supports --lsp --no-env-path
arguments, which are used to execute it as an LSP server.
This extension contributes the following settings:
pyang.cli.args
Extra
pyang
CLI arguments, above--lsp --no-env-path
(which are already provided). This allows for tuning of LSP server defaults, providing search paths, and provisioning ofpyang
plugins, for example.pyang.trace.server
LSP trace level.
pyang.debug.server.enable
LSP is used via TCP socket, instead of stdio.
pyang.debug.server.host
LSP Server Host, when LSP is used via TCP socket.
pyang.debug.server.port
LSP Server Port, when LSP is used via TCP socket.
This extension contributes the following commands:
pyang.client.restart
pyang: Restart Language Server
restarts the language client and in turn reinstantiates the language server. Whenpyang.debug.server.enable
is set, it merely reinitiates the TCP connection and hence TCP server should already be initiated.
Missing pyang
or older installations that do not meet requirements are not
handled gracefully.
Change of some settings e.g., CLI arguments, requires reload of manual reload of
the editor. pyang: Restart Language Server
command reuses the settings from
the last startup.
For issues pertaining to the language server, please refer to documentation for
pyang
.
pyang.cli.args
configuration is now empty by defaultpyang
startup arguments now include--verbose
, in addition to--lsp
and--no-env-path
arguments earlier- Added support for YANG Tree Diagram syntax highlighting.
.yangtree
and.ytd
file extensions are registered as YANG Tree Diagram by default.
- Added support for pyang's "References" Code Lens command
- Added support for older VS Code >= 1.65.0
- Added command
pyang: Restart Language Server
Initial release of the extension