YANG Language Support
This extension provides syntax highlighting and LSP support for YANG language in Zed editor.
How to install
With Forge Super installed, the button above opens the app on this extension, where you press Install. Nothing is installed until you do.
You can also open the Extensions panel in the app and search for YANG Language Support. The extension's id is yang.
Don't have Forge Super yet? Download it here.
README
From the extension's repository, written by its authors and not by Mentenaz. See the source.
YANG language support for Zed
Full YANG language support for the Zed IDE.
Features
- Syntax highlighting using tree-sitter-yang.
- Language Server Protocol (LSP) using yang-lsp.
- Code completion
- Diagnostics and validation
- Go to definition
- Find references
- Hover documentation
Requirements
- Java Runtime -
yang-lsprequires Java to run.- macOS:
brew install openjdk - Ubuntu/Debian:
sudo apt install default-jdk - RHEL/CentOS:
sudo yum install java-11-openjdk
- macOS:
The language server is automatically downloaded on first use.
Configuration
Configure yang-lsp through Zed's settings (~/.config/zed/settings.json or .zed/settings.json in your project):
{
"lsp": {
"yang-lsp": {
"settings": {
"excludePath": "build:bin",
"yangPath": "/path/to/yang/libs",
"diagnostic": {
"xpath-linking-error": "ignore",
"missing-revision": "warning"
}
}
}
}
}
Available Settings
| Setting | Description |
|---|---|
excludePath | Colon-separated paths to exclude from indexing (e.g., "build:bin") |
yangPath | Path to external YANG libraries (files, directories, or ZIP files) |
yangPathIgnore | Paths to ignore within yangPath |
code-lens-enabled | Enable/disable code lens ("on" or "off") |
diagnostic | Object mapping diagnostic codes to severities ("error", "warning", "ignore") |
You can also create a yang.settings file in your project root for project-specific configuration.
Credits
- tree-sitter-yang - Grammar for syntax highlighting. All grammar credits go to the original authors.
- yang-lsp - Language server by TypeFox.