fix eslint LSP auto format on save
This commit is contained in:
parent
06c04d64e3
commit
42e571b77c
4 changed files with 29 additions and 18 deletions
8
init.lua
8
init.lua
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue