This commit is contained in:
Zackarias Montell
2025-05-22 08:00:13 +02:00
4 changed files with 52 additions and 6 deletions

View File

@@ -562,6 +562,22 @@ require('lazy').setup({
},
},
}, -- hybrid mode is default
eslint = {
flags = { debounce_text_changes = 500 },
on_attach = function(client, bufnr)
client.server_capabilities.documentFormattingProvider = true
if client.server_capabilities.documentFormattingProvider then
local au_lsp = vim.api.nvim_create_augroup('eslint_lsp', { clear = true })
vim.api.nvim_create_autocmd('BufWritePre', {
pattern = '*',
callback = function()
vim.lsp.buf.format { async = true }
end,
group = au_lsp,
})
end
end,
},
html = {},
cssls = {},
jsonls = {},
@@ -669,6 +685,7 @@ require('lazy').setup({
-- You can use 'stop_after_first' to run the first available formatter from the list
javascript = {},
typescript = {},
esmodule = { 'eslint-lsp' },
vue = {},
typescriptreact = {},
javascriptreact = {},