fix: eslint
This commit is contained in:
parent
1363b4f077
commit
78c926131c
2 changed files with 16 additions and 3 deletions
13
init.lua
13
init.lua
|
|
@ -483,6 +483,7 @@ require('which-key').register({
|
|||
local servers = {
|
||||
tsserver = {},
|
||||
denols = {},
|
||||
eslint = {},
|
||||
lua_ls = {
|
||||
Lua = {
|
||||
workspace = { checkThirdParty = false },
|
||||
|
|
@ -526,6 +527,18 @@ lspconfig.denols.setup({
|
|||
},
|
||||
})
|
||||
|
||||
lspconfig.eslint.setup {
|
||||
root_dir = lspconfig.util.root_pattern('.eslintrc', '.eslintrc.js', '.eslintrc.json'),
|
||||
settings = {
|
||||
format = { enable = true },
|
||||
},
|
||||
handlers = {
|
||||
['window/showMessageRequest'] = function(_, result)
|
||||
return result.message:match('ENOENT') and vim.NIL or result
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
lspconfig.tsserver.setup({
|
||||
root_dir = lspconfig.util.root_pattern("package.json"),
|
||||
on_attach = function(client, bufnr)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue