YANG (yang-lsp)#
lsp-mode provides YANG language support via the TypeFox/yang-lsp Server.
The server identifier is yls as an abbreviation of the released binary called
yang-language-server.
Configuration#
Add following configuration in .emacs or init.el to hook lsp on YANG files,
since yang-mode is the supported major mode.
(add-hook 'yang-mode-hook 'lsp)
It recommended to add following configuration for the yang.settings file,
which resides at the user/project/workspace root, to be validated via
lsp-json. This may be automated by lsp-yang in later stages.
(setq lsp-json-schemas
      `[(:fileMatch ["yang.settings"] :url lsp-yang-yls-settings-schema-url)])
To automatically trigger the lsp-json based validation, following
configuration is recommended.
(add-hook 'jsonc-mode-hook 'lsp)
Known Issues#
- Files in the project need to be opened in buffer to be known by LSP server
- yang.settingsis not associated with its JSON schema- yang-lsp-settings-schema.jsonyet
- yang-lsp settings file yang.settingsis not respected
- lsp-format-bufferdoes not follow- yang-modeor- yang.settings
- Snippets have a bad format with extraneous characters
  
    
      Last update:
      October 29, 2025