Add the yaml lsp

This commit is contained in:
Fábio André Damas 2025-03-29 20:01:39 +00:00
parent 4a5d74b19f
commit 9174cd17fa
3 changed files with 5 additions and 5 deletions

View file

@ -30,7 +30,7 @@ vim.api.nvim_create_autocmd('LspAttach', {
local client = vim.lsp.get_client_by_id(args.data.client_id)
if not client then return end
local LSP_CLIENT_NAMES_FORMAT_ON_SAVE = { "lua_ls", "jdtls", "gopls", "taplo" }
local LSP_CLIENT_NAMES_FORMAT_ON_SAVE = { "lua_ls", "jdtls", "gopls", "taplo", "yamlls" }
for _, client_name_autoformat in ipairs(LSP_CLIENT_NAMES_FORMAT_ON_SAVE) do
if client.name == client_name_autoformat and client.server_capabilities.documentFormattingProvider then
-- Format the current buffer on save