ajs-nvim/lua/config/lsp/servers/eslint.lua

43 lines
750 B
Lua
Raw Normal View History

2024-03-14 11:53:45 +00:00
local M = {}
local on_attach = function(client, bufnr)
2024-03-17 22:03:40 +00:00
client.server_capabilities.documentFormattingProvider = true
local function buf_set_option(...)
vim.api.nvim_buf_set_option(bufnr, ...)
end
2024-03-14 11:53:45 +00:00
2024-03-17 22:03:40 +00:00
buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc")
2024-03-14 11:53:45 +00:00
end
2024-03-17 22:03:40 +00:00
M.on_attach = on_attach
2024-03-14 11:53:45 +00:00
M.settings = {
2024-03-17 22:03:40 +00:00
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",
},
2024-03-14 11:53:45 +00:00
}
return M