repositories / dotfiles
dotfiles
bugabingas dorkfiles
owned by admin
neovim/lsp/yamlls.lua
Raw---@brief
---
--- [yaml-language-server](https://github.com/redhat-developer/yaml-language-server)
---@type vim.lsp.Config
return {
cmd = { 'yaml-language-server', '--stdio' },
filetypes = { 'yaml', 'yaml.docker-compose', 'yaml.gitlab', 'yaml.helm-values' },
root_markers = { '.git' },
settings = {
redhat = { telemetry = { enabled = false } },
yaml = { format = { enable = true } },
},
on_init = function(client)
client.server_capabilities.documentFormattingProvider = true
-- https://github.com/neovim/nvim-lspconfig/pull/4016
-- Formatting is disabled by default in yaml-language-server.
-- This hack sets the capability to true so autocmds checking
-- `client:supports_method('textDocument/formatting')` work correctly.
end,
}