mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-24 17:58:51 +02:00
fix(yamlls): work-around for yaml formatting on Neovim < 0.10. Fixes #1435
This commit is contained in:
parent
b220e54159
commit
7f5051ef72
1 changed files with 12 additions and 0 deletions
|
@ -54,6 +54,18 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
setup = {
|
||||||
|
yamlls = function()
|
||||||
|
-- Neovim < 0.10 does not have dynamic registration for formatting
|
||||||
|
if vim.fn.has("nvim-0.10") == 0 then
|
||||||
|
require("lazyvim.util").on_attach(function(client, _)
|
||||||
|
if client.name == "yamlls" then
|
||||||
|
client.server_capabilities.documentFormattingProvider = true
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue