revert to default eslint config
This commit is contained in:
parent
c779823152
commit
2e808049b7
|
@ -1,40 +1,42 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
local on_attach = function(client, bufnr)
|
local on_attach = function(client, bufnr)
|
||||||
client.server_capabilities.documentFormattingProvider = true
|
client.server_capabilities.documentFormattingProvider = true
|
||||||
local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end
|
local function buf_set_option(...)
|
||||||
|
vim.api.nvim_buf_set_option(bufnr, ...)
|
||||||
|
end
|
||||||
|
|
||||||
buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc")
|
buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc")
|
||||||
end
|
end
|
||||||
|
|
||||||
M.on_attach = on_attach;
|
M.on_attach = on_attach
|
||||||
|
|
||||||
M.settings = {
|
M.settings = {
|
||||||
codeAction = {
|
codeAction = {
|
||||||
disableRuleComment = {
|
disableRuleComment = {
|
||||||
enable = true,
|
enable = true,
|
||||||
location = "separateLine"
|
location = "separateLine",
|
||||||
},
|
},
|
||||||
showDocumentation = {
|
showDocumentation = {
|
||||||
enable = true
|
enable = true,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
codeActionOnSave = {
|
codeActionOnSave = {
|
||||||
enable = false,
|
enable = false,
|
||||||
mode = "all"
|
mode = "all",
|
||||||
},
|
},
|
||||||
format = true,
|
format = true,
|
||||||
nodePath = "",
|
nodePath = "",
|
||||||
onIgnoredFiles = "off",
|
onIgnoredFiles = "off",
|
||||||
packageManager = "npm",
|
packageManager = "npm",
|
||||||
quiet = false,
|
quiet = false,
|
||||||
rulesCustomizations = {},
|
rulesCustomizations = {},
|
||||||
run = "onType",
|
run = "onType",
|
||||||
useESLintClass = false,
|
useESLintClass = false,
|
||||||
validate = "on",
|
validate = "on",
|
||||||
workingDirectory = {
|
workingDirectory = {
|
||||||
mode = "location"
|
mode = "location",
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
@ -43,17 +43,15 @@ require("mason-lspconfig").setup_handlers({
|
||||||
require("lspconfig")[server_name].setup({
|
require("lspconfig")[server_name].setup({
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
capabilities = lsp_capabilities,
|
capabilities = lsp_capabilities,
|
||||||
--handlers = handlers,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
["eslint"] = function()
|
|
||||||
lspconfig.eslint.setup({
|
|
||||||
capabilities = lsp_capabilities,
|
|
||||||
--handlers = handlers,
|
|
||||||
on_attach = require("config.lsp.servers.eslint").on_attach,
|
|
||||||
settings = require("config.lsp.servers.eslint").settings,
|
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
|
-- ["eslint"] = function()
|
||||||
|
-- lspconfig.eslint.setup({
|
||||||
|
-- capabilities = lsp_capabilities,
|
||||||
|
-- on_attach = require("config.lsp.servers.eslint").on_attach,
|
||||||
|
-- settings = require("config.lsp.servers.eslint").settings,
|
||||||
|
-- })
|
||||||
|
-- end,
|
||||||
["lua_ls"] = function()
|
["lua_ls"] = function()
|
||||||
lspconfig.lua_ls.setup({
|
lspconfig.lua_ls.setup({
|
||||||
capabilities = lsp_capabilities,
|
capabilities = lsp_capabilities,
|
||||||
|
|
Loading…
Reference in New Issue