aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2021-11-08 15:40:18 +0100
committerWilliam Boman <william@redwill.se>2021-11-08 15:40:18 +0100
commitb55df5d381e67b6d26e3fcfe8f6357970919739f (patch)
tree74ade2e1192db4f9e2ce9d16ea4bfce5fec12d4c /lua
parentdocs: wrap table arg with parantheses to avoid ambiguous syntax (diff)
downloadmason-b55df5d381e67b6d26e3fcfe8f6357970919739f.tar
mason-b55df5d381e67b6d26e3fcfe8f6357970919739f.tar.gz
mason-b55df5d381e67b6d26e3fcfe8f6357970919739f.tar.bz2
mason-b55df5d381e67b6d26e3fcfe8f6357970919739f.tar.lz
mason-b55df5d381e67b6d26e3fcfe8f6357970919739f.tar.xz
mason-b55df5d381e67b6d26e3fcfe8f6357970919739f.tar.zst
mason-b55df5d381e67b6d26e3fcfe8f6357970919739f.zip
remove deprecated eslintls
Diffstat (limited to 'lua')
-rw-r--r--lua/nvim-lsp-installer/servers/eslintls/init.lua101
-rw-r--r--lua/nvim-lsp-installer/servers/init.lua2
2 files changed, 0 insertions, 103 deletions
diff --git a/lua/nvim-lsp-installer/servers/eslintls/init.lua b/lua/nvim-lsp-installer/servers/eslintls/init.lua
deleted file mode 100644
index a7a661da..00000000
--- a/lua/nvim-lsp-installer/servers/eslintls/init.lua
+++ /dev/null
@@ -1,101 +0,0 @@
-local notify = require "nvim-lsp-installer.notify"
-local server = require "nvim-lsp-installer.server"
-local path = require "nvim-lsp-installer.path"
-local std = require "nvim-lsp-installer.installers.std"
-local npm = require "nvim-lsp-installer.installers.npm"
-
-local ConfirmExecutionResult = {
- deny = 1,
- confirmationPending = 2,
- confirmationCanceled = 3,
- approved = 4,
-}
-
-return function(name, root_dir)
- return server.Server:new {
- name = name,
- root_dir = root_dir,
- deprecated = {
- message = "eslintls has been replaced with eslint. It's still the same server - just a different name and upstream dependencies.",
- replace_with = "eslint",
- },
- languages = { "eslint" },
- installer = {
- std.git_clone "https://github.com/microsoft/vscode-eslint",
- npm.install(),
- npm.run "compile:server",
- },
- pre_setup = function()
- local lspconfig = require "lspconfig"
- local configs = require "lspconfig/configs"
-
- if not configs.eslintls then
- configs.eslintls = {
- default_config = {
- root_dir = lspconfig.util.root_pattern(".eslintrc*", "package.json", ".git"),
- -- Refer to https://github.com/Microsoft/vscode-eslint#settings-options for documentation.
- settings = {
- validate = "on",
- run = "onType",
- codeAction = {
- disableRuleComment = {
- enable = true,
- -- "sameLine" might not work as expected, see https://github.com/williamboman/nvim-lsp-installer/issues/4
- location = "separateLine",
- },
- showDocumentation = {
- enable = true,
- },
- },
- rulesCustomizations = {},
- -- Automatically determine working directory by locating .eslintrc config files.
- --
- -- It's recommended not to change this.
- workingDirectory = { mode = "auto" },
- -- If nodePath is a non-null/undefined value the eslint LSP runs into runtime exceptions.
- --
- -- It's recommended not to change this.
- nodePath = "",
- -- The "workspaceFolder" is a VSCode concept. We set it to the root
- -- directory to not restrict the LPS server when it traverses the
- -- file tree when locating a .eslintrc config file.
- --
- -- It's recommended not to change this.
- workspaceFolder = {
- uri = "/",
- name = "root",
- },
- },
- },
- }
- end
- end,
- default_options = {
- filetypes = { "javascript", "javascriptreact", "typescript", "typescriptreact" },
- cmd = { "node", path.concat { root_dir, "server", "out", "eslintServer.js" }, "--stdio" },
- handlers = {
- ["eslint/openDoc"] = function(_, _, open_doc)
- os.execute(string.format("open %q", open_doc.url))
- return { id = nil, result = true }
- end,
- ["eslint/confirmESLintExecution"] = function()
- -- VSCode language servers have a policy to request explicit approval
- -- before applying code changes. We just approve it immediately.
- return ConfirmExecutionResult.approved
- end,
- ["eslint/probeFailed"] = function()
- notify("ESLint probe failed.", vim.log.levels.ERROR)
- return { id = nil, result = true }
- end,
- ["eslint/noLibrary"] = function()
- notify("Unable to find ESLint library.", vim.log.levels.ERROR)
- return { id = nil, result = true }
- end,
- ["eslint/noConfig"] = function()
- notify("Unable to find ESLint configuration.", vim.log.levels.ERROR)
- return { id = nil, result = true }
- end,
- },
- },
- }
-end
diff --git a/lua/nvim-lsp-installer/servers/init.lua b/lua/nvim-lsp-installer/servers/init.lua
index 46be6dab..7eef5de9 100644
--- a/lua/nvim-lsp-installer/servers/init.lua
+++ b/lua/nvim-lsp-installer/servers/init.lua
@@ -15,7 +15,6 @@ local INSTALL_DIRS = {
["elixirls"] = "elixir",
["elmls"] = "elm",
["eslint"] = "vscode-eslint",
- ["eslintls"] = "eslint",
["gopls"] = "go",
["hls"] = "haskell",
["intelephense"] = "php",
@@ -52,7 +51,6 @@ local CORE_SERVERS = Data.set_of {
"emmet_ls",
"erlangls",
"eslint",
- "eslintls",
"fortls",
"gopls",
"graphql",