mirror of https://github.com/LazyVim/starter
feat: config eslint
parent
86ba1d10ce
commit
c60085d880
|
@ -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…
Reference in New Issue