Neovim
oxyaml is a drop-in replacement for yaml-language-server (yamlls). Point yamlls at oxyaml --stdio and your existing yamlls / yaml.* settings (schemas, formatting, custom tags, modelines) keep working unchanged without Node.js.
Status: Lua snippets below are untested with
nvimin this environment (nvimis not installed locally).
Prerequisites
Install oxyaml and make sure oxyaml is on your PATH.
nvim-lspconfig
Neovim 0.11+ (vim.lsp.config)
Override cmd on the existing yamlls configuration (one-line change from yaml-language-server):
vim.lsp.config('yamlls', { cmd = { 'oxyaml', '--stdio' },})vim.lsp.enable('yamlls')If you already pass settings = { yaml = { ... } } or redhat = { telemetry = { enabled = false } } to vim.lsp.config('yamlls', ...), keep them as-is and add cmd = { 'oxyaml', '--stdio' }.
Neovim 0.10 and earlier (require('lspconfig'))
require('lspconfig').yamlls.setup({ cmd = { 'oxyaml', '--stdio' },})mason.nvim
A oxyaml package for mason-registry is planned once release binaries are published. Until that registry entry is live:
- Install
oxyamlon yourPATHinstead of installingyaml-language-serverthrough Mason. - If you use
mason-lspconfig.nvim, keepyamllsout ofensure_installed(or avoid lettingmason-lspconfigoverridecmdback toyaml-language-server).