diff --git a/lua/config/lsp/servers/eslint.lua b/lua/config/lsp/servers/eslint.lua new file mode 100644 index 0000000..c491003 --- /dev/null +++ b/lua/config/lsp/servers/eslint.lua @@ -0,0 +1,40 @@ +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 + + buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc") +end + +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" + } +} + +return M