allow custom handlers, add for eslint
This commit is contained in:
parent
ab1682da18
commit
aa6d9b284f
|
@ -0,0 +1,22 @@
|
|||
local lspconfig = require("lspconfig")
|
||||
|
||||
require("mason-lspconfig").setup_handlers({
|
||||
-- The first entry (without a key) will be the default handler
|
||||
-- and will be called for each installed server that doesn't have
|
||||
-- a dedicated handler.
|
||||
function(server_name)
|
||||
require("lspconfig")[server_name].setup({
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
--handlers = handlers,
|
||||
})
|
||||
end,
|
||||
["eslint"] = function()
|
||||
lspconfig.eslint.setup({
|
||||
capabilities = capabilities,
|
||||
--handlers = handlers,
|
||||
on_attach = require("config.lsp.servers.eslint").on_attach,
|
||||
settings = require("config.lsp.servers.eslint").settings,
|
||||
})
|
||||
end,
|
||||
})
|
Loading…
Reference in New Issue