nvim/lua/lsp/eslint.lua
2022-04-22 17:42:26 +08:00

14 lines
469 B
Lua

local eslint_config = require("lspconfig.server_configurations.eslint")
return {
on_attach = function(client, bufnr)
-- neovim's LSP client does not currently support dynamic capabilities registration, so we need to set
-- the resolved capabilities of the eslint server ourselves!
client.resolved_capabilities.document_formatting = true
end,
settings = {
format = { enable = true },
},
cmd = { "yarn", "exec", unpack(eslint_config.default_config.cmd) }
}