fix eslint LSP auto format on save

This commit is contained in:
Noah Håkansson 2024-02-26 15:34:13 +01:00
parent 06c04d64e3
commit 42e571b77c
4 changed files with 29 additions and 18 deletions

View file

@ -585,14 +585,6 @@ local on_attach = function(client, bufnr)
vim.lsp.buf.format()
end, { desc = 'Format current buffer with LSP' })
-- Set eslint LSP client to format on save for javascript and typescript files
if vim.bo.filetype == 'javascript' or vim.bo.filetype == 'typescript' then
vim.api.nvim_create_autocmd('BufWritePre', {
buffer = bufnr,
command = 'EslintFixAll',
})
end
-- When using pyright and ruff_lsp, disable hover in favor of Pyright
if client.name == 'ruff_lsp' then
-- Disable hover in favor of Pyright