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