fix(yamlls): work-around for yaml formatting on Neovim < 0.10. Fixes #1435

This commit is contained in:
Folke Lemaitre
2023-09-28 09:00:31 +02:00
parent b220e54159
commit 7f5051ef72

View File

@ -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,
},
},
},
}