mirror of
https://github.com/LazyVim/starter.git
synced 2026-07-25 14:01:03 +00:00
feat: config eslint
This commit is contained in:
parent
3f4dc4983b
commit
7d8a7f106c
1 changed files with 17 additions and 0 deletions
|
|
@ -68,4 +68,21 @@ return {
|
|||
close_if_last_window = true,
|
||||
},
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
opts = {
|
||||
servers = { eslint = {} },
|
||||
setup = {
|
||||
eslint = function()
|
||||
require("lazyvim.util").lsp.on_attach(function(client)
|
||||
if client.name == "eslint" then
|
||||
client.server_capabilities.documentFormattingProvider = true
|
||||
elseif client.name == "tsserver" then
|
||||
client.server_capabilities.documentFormattingProvider = false
|
||||
end
|
||||
end)
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue