aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-lsp-installer/installers
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2021-04-05 14:19:07 +0200
committerGitHub <noreply@github.com>2021-04-05 14:19:07 +0200
commitdcf117a8a60d887a2c2ff9d5617a9c39c5ee95fb (patch)
tree419e086d757624aa9e2bcaa456e02a6c8f7a3968 /lua/nvim-lsp-installer/installers
parenteslintls: avoid globbing/word splitting (diff)
downloadmason-dcf117a8a60d887a2c2ff9d5617a9c39c5ee95fb.tar
mason-dcf117a8a60d887a2c2ff9d5617a9c39c5ee95fb.tar.gz
mason-dcf117a8a60d887a2c2ff9d5617a9c39c5ee95fb.tar.bz2
mason-dcf117a8a60d887a2c2ff9d5617a9c39c5ee95fb.tar.lz
mason-dcf117a8a60d887a2c2ff9d5617a9c39c5ee95fb.tar.xz
mason-dcf117a8a60d887a2c2ff9d5617a9c39c5ee95fb.tar.zst
mason-dcf117a8a60d887a2c2ff9d5617a9c39c5ee95fb.zip
rename Installer to Server for clarity (#3)
Diffstat (limited to 'lua/nvim-lsp-installer/installers')
-rw-r--r--lua/nvim-lsp-installer/installers/bashls.lua12
-rw-r--r--lua/nvim-lsp-installer/installers/cssls.lua12
-rw-r--r--lua/nvim-lsp-installer/installers/dockerls.lua12
-rw-r--r--lua/nvim-lsp-installer/installers/eslintls.lua80
-rw-r--r--lua/nvim-lsp-installer/installers/graphql.lua16
-rw-r--r--lua/nvim-lsp-installer/installers/html.lua12
-rw-r--r--lua/nvim-lsp-installer/installers/jsonls.lua12
-rw-r--r--lua/nvim-lsp-installer/installers/pyright.lua13
-rw-r--r--lua/nvim-lsp-installer/installers/solargraph.lua34
-rw-r--r--lua/nvim-lsp-installer/installers/sumneko_lua.lua57
-rw-r--r--lua/nvim-lsp-installer/installers/tsserver.lua12
-rw-r--r--lua/nvim-lsp-installer/installers/vimls.lua12
-rw-r--r--lua/nvim-lsp-installer/installers/yamlls.lua12
13 files changed, 0 insertions, 296 deletions
diff --git a/lua/nvim-lsp-installer/installers/bashls.lua b/lua/nvim-lsp-installer/installers/bashls.lua
deleted file mode 100644
index 68b29c41..00000000
--- a/lua/nvim-lsp-installer/installers/bashls.lua
+++ /dev/null
@@ -1,12 +0,0 @@
-local installer = require('nvim-lsp-installer.installer')
-
-local root_dir = installer.get_server_root_path('bash')
-
-return installer.Installer:new {
- name = "bashls",
- root_dir = root_dir,
- install_cmd = [[npm install bash-language-server@latest]],
- default_options = {
- cmd = { root_dir .. "/node_modules/.bin/bash-language-server", "start" },
- },
-}
diff --git a/lua/nvim-lsp-installer/installers/cssls.lua b/lua/nvim-lsp-installer/installers/cssls.lua
deleted file mode 100644
index 23010cd2..00000000
--- a/lua/nvim-lsp-installer/installers/cssls.lua
+++ /dev/null
@@ -1,12 +0,0 @@
-local installer = require('nvim-lsp-installer.installer')
-
-local root_dir = installer.get_server_root_path('css')
-
-return installer.Installer:new {
- name = 'cssls',
- root_dir = root_dir,
- install_cmd = [[npm install vscode-css-languageserver-bin]],
- default_options = {
- cmd = { root_dir .. '/node_modules/.bin/css-languageserver', '--stdio' },
- },
-}
diff --git a/lua/nvim-lsp-installer/installers/dockerls.lua b/lua/nvim-lsp-installer/installers/dockerls.lua
deleted file mode 100644
index 021b098b..00000000
--- a/lua/nvim-lsp-installer/installers/dockerls.lua
+++ /dev/null
@@ -1,12 +0,0 @@
-local installer = require('nvim-lsp-installer.installer')
-
-local root_dir = installer.get_server_root_path('dockerfile')
-
-return installer.Installer:new {
- name = 'dockerls',
- root_dir = root_dir,
- install_cmd = [[npm install dockerfile-language-server-nodejs@latest]],
- default_options = {
- cmd = { root_dir .. '/node_modules/.bin/docker-langserver', '--stdio' },
- },
-}
diff --git a/lua/nvim-lsp-installer/installers/eslintls.lua b/lua/nvim-lsp-installer/installers/eslintls.lua
deleted file mode 100644
index 13ddf94f..00000000
--- a/lua/nvim-lsp-installer/installers/eslintls.lua
+++ /dev/null
@@ -1,80 +0,0 @@
-local lspconfig = require'lspconfig'
-local configs = require'lspconfig/configs'
-
-local installer = require'nvim-lsp-installer.installer'
-
-if not lspconfig.eslintls then
- configs.eslintls = {
- default_config = {
- filetypes = {'javascript', 'javascriptreact', 'typescript', 'typescriptreact'},
- root_dir = lspconfig.util.root_pattern(".eslintrc*", "package.json", ".git"),
- settings = {
- nodePath = '', -- If this is a non-null/undefined value the eslint LSP runs into runtime exceptions.
- validate = 'on',
- run = 'onType',
- workingDirectory = {mode = "auto"},
- workspaceFolder = {
- uri = "/",
- name = "root",
- },
- codeAction = {
- disableRuleComment = {
- enable = true,
- location = "sameLine",
- },
- showDocumentation = {
- enable = true
- }
- },
- },
- },
- }
-end
-
-local ConfirmExecutionResult = {
- deny = 1,
- confirmationPending = 2,
- confirmationCanceled = 3,
- approved = 4
-}
-
-local root_dir = installer.get_server_root_path('eslint')
-local install_cmd = [[
-git clone https://github.com/microsoft/vscode-eslint .;
-npm install;
-cd server;
-npm install;
-npx tsc;
-]]
-
-return installer.Installer:new {
- name = "eslintls",
- root_dir = root_dir,
- install_cmd = install_cmd,
- default_options = {
- cmd = {'node', 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 ()
- vim.api.nvim_err_writeln('ESLint probe failed.')
- return {id = nil, result = true}
- end,
- ["eslint/noLibrary"] = function ()
- vim.api.nvim_err_writeln('Unable to find ESLint library.')
- return {id = nil, result = true}
- end,
- ["eslint/noConfig"] = function ()
- vim.api.nvim_err_writeln('Unable to find ESLint configuration.')
- return {id = nil, result = true}
- end,
- },
- },
-}
diff --git a/lua/nvim-lsp-installer/installers/graphql.lua b/lua/nvim-lsp-installer/installers/graphql.lua
deleted file mode 100644
index 471eb3ba..00000000
--- a/lua/nvim-lsp-installer/installers/graphql.lua
+++ /dev/null
@@ -1,16 +0,0 @@
-local util = require('lspconfig.util')
-
-local installer = require('nvim-lsp-installer.installer')
-
-local root_dir = installer.get_server_root_path('graphql')
-
-return installer.Installer:new {
- name = "graphql",
- root_dir = root_dir,
- install_cmd = [[npm install graphql-language-service-cli@latest graphql]],
- default_options = {
- cmd = { root_dir .. "/node_modules/.bin/graphql-lsp", "server", "-m", "stream" },
- filetypes = { 'typescriptreact', 'javascriptreact', 'graphql' },
- root_dir = util.root_pattern('.git', '.graphqlrc'),
- },
-}
diff --git a/lua/nvim-lsp-installer/installers/html.lua b/lua/nvim-lsp-installer/installers/html.lua
deleted file mode 100644
index 8e269e18..00000000
--- a/lua/nvim-lsp-installer/installers/html.lua
+++ /dev/null
@@ -1,12 +0,0 @@
-local installer = require('nvim-lsp-installer.installer')
-
-local root_dir = installer.get_server_root_path('html')
-
-return installer.Installer:new {
- name = "html",
- root_dir = root_dir,
- install_cmd = [[npm install vscode-html-languageserver-bin]],
- default_options = {
- cmd = { root_dir .. '/node_modules/.bin/html-languageserver', '--stdio' },
- },
-}
diff --git a/lua/nvim-lsp-installer/installers/jsonls.lua b/lua/nvim-lsp-installer/installers/jsonls.lua
deleted file mode 100644
index 0298f5ae..00000000
--- a/lua/nvim-lsp-installer/installers/jsonls.lua
+++ /dev/null
@@ -1,12 +0,0 @@
-local installer = require('nvim-lsp-installer.installer')
-
-local root_dir = installer.get_server_root_path('json')
-
-return installer.Installer:new {
- name = "jsonls",
- root_dir = root_dir,
- install_cmd = [[npm install vscode-json-languageserver-bin]],
- default_options = {
- cmd = { root_dir .. '/node_modules/.bin/json-languageserver', '--stdio' },
- },
-}
diff --git a/lua/nvim-lsp-installer/installers/pyright.lua b/lua/nvim-lsp-installer/installers/pyright.lua
deleted file mode 100644
index a6684def..00000000
--- a/lua/nvim-lsp-installer/installers/pyright.lua
+++ /dev/null
@@ -1,13 +0,0 @@
-local installer = require('nvim-lsp-installer.installer')
-
-local root_dir = installer.get_server_root_path('python')
-
-return installer.Installer:new {
- name = "pyright",
- root_dir = root_dir,
- install_cmd = [[npm install pyright]],
- default_options = {
- cmd = { root_dir .. '/node_modules/.bin/pyright-langserver', '--stdio' },
- on_attach = installer.common_on_attach,
- },
-}
diff --git a/lua/nvim-lsp-installer/installers/solargraph.lua b/lua/nvim-lsp-installer/installers/solargraph.lua
deleted file mode 100644
index c227c2b3..00000000
--- a/lua/nvim-lsp-installer/installers/solargraph.lua
+++ /dev/null
@@ -1,34 +0,0 @@
-local installer = require('nvim-lsp-installer.installer')
-
-local root_dir = installer.get_server_root_path('ruby')
-
-local install_cmd = [[
-wget -O solargraph.tar $(curl -s https://api.github.com/repos/castwide/solargraph/tags | grep 'tarball_url' | cut -d\" -f4 | head -n1);
-rm -rf solargraph;
-mkdir solargraph;
-tar -xzf solargraph.tar -C solargraph --strip-components 1;
-rm solargraph.tar;
-cd solargraph;
-
-bundle install --without development --path vendor/bundle;
-
-echo '#!/usr/bin/env bash' > solargraph;
-echo 'cd "$(dirname "$0")" || exit' >> solargraph;
-echo 'bundle exec solargraph $*' >> solargraph;
-
-chmod +x solargraph;
-]]
-
-return installer.Installer:new {
- name = "solargraph",
- root_dir = root_dir,
- install_cmd = install_cmd,
- pre_install = function ()
- if vim.fn.executable('bundle') ~= 1 then
- error("bundle not installed")
- end
- end,
- default_options = {
- cmd = { root_dir .. '/solargraph/solargraph', 'stdio' },
- }
-}
diff --git a/lua/nvim-lsp-installer/installers/sumneko_lua.lua b/lua/nvim-lsp-installer/installers/sumneko_lua.lua
deleted file mode 100644
index 947ae276..00000000
--- a/lua/nvim-lsp-installer/installers/sumneko_lua.lua
+++ /dev/null
@@ -1,57 +0,0 @@
-local installer = require('nvim-lsp-installer.installer')
-
-local root_dir = installer.get_server_root_path('lua')
-
-local install_cmd = [=[
-rm -rf lua-language-server;
-git clone https://github.com/sumneko/lua-language-server;
-cd lua-language-server/;
-git submodule update --init --recursive;
-cd 3rd/luamake;
-if [[ $(uname) == Darwin ]]; then
- ninja -f ninja/macos.ninja;
-elif [[ $(uname) == Linux ]]; then
- ninja -f ninja/linux.ninja;
-else
- >&2 echo "$(uname) not supported.";
- exit 1;
-fi
-cd ../../;
-./3rd/luamake/luamake rebuild;
-]=]
-
-local uname_alias = {
- Darwin = 'macOS',
-}
-local uname = vim.fn.system('uname'):gsub("%s+", "")
-local bin_dir = uname_alias[uname] or uname
-
-return installer.Installer:new {
- name = "sumneko_lua",
- root_dir = root_dir,
- install_cmd = install_cmd,
- pre_install = function()
- if vim.fn.executable('ninja') ~= 1 then
- error("ninja not installed (see https://github.com/ninja-build/ninja/wiki/Pre-built-Ninja-packages)")
- end
- end,
- default_options = {
- cmd = { root_dir .. "/lua-language-server/bin/" .. bin_dir .. "/lua-language-server" , "-E", root_dir .. "/lua-language-server/main.lua"},
- settings = {
- Lua = {
- diagnostics = {
- -- Get the language server to recognize the `vim` global
- globals = {'vim'}
- },
- workspace = {
- -- Make the server aware of Neovim runtime files
- library = {
- [vim.fn.expand('$VIMRUNTIME/lua')] = true,
- [vim.fn.expand('$VIMRUNTIME/lua/vim/lsp')] = true,
- },
- maxPreload = 10000
- }
- }
- },
- }
-}
diff --git a/lua/nvim-lsp-installer/installers/tsserver.lua b/lua/nvim-lsp-installer/installers/tsserver.lua
deleted file mode 100644
index 87310e02..00000000
--- a/lua/nvim-lsp-installer/installers/tsserver.lua
+++ /dev/null
@@ -1,12 +0,0 @@
-local installer = require('nvim-lsp-installer.installer')
-
-local root_dir = installer.get_server_root_path('tsserver')
-
-return installer.Installer:new {
- name = "tsserver",
- root_dir = root_dir,
- install_cmd = [[npm install typescript-language-server]],
- default_options = {
- cmd = { root_dir .. '/node_modules/.bin/typescript-language-server', '--stdio' },
- },
-}
diff --git a/lua/nvim-lsp-installer/installers/vimls.lua b/lua/nvim-lsp-installer/installers/vimls.lua
deleted file mode 100644
index 3e6786b7..00000000
--- a/lua/nvim-lsp-installer/installers/vimls.lua
+++ /dev/null
@@ -1,12 +0,0 @@
-local installer = require('nvim-lsp-installer.installer')
-
-local root_dir = installer.get_server_root_path('vim')
-
-return installer.Installer:new {
- name = "vimls",
- root_dir = root_dir,
- install_cmd = [[npm install vim-language-server@latest]],
- default_options = {
- cmd = { root_dir .. "/node_modules/.bin/vim-language-server", "--stdio" },
- }
-}
diff --git a/lua/nvim-lsp-installer/installers/yamlls.lua b/lua/nvim-lsp-installer/installers/yamlls.lua
deleted file mode 100644
index 5d68915a..00000000
--- a/lua/nvim-lsp-installer/installers/yamlls.lua
+++ /dev/null
@@ -1,12 +0,0 @@
-local installer = require('nvim-lsp-installer.installer')
-
-local root_dir = installer.get_server_root_path('yaml')
-
-return installer.Installer:new {
- name = "yamlls",
- root_dir = root_dir,
- install_cmd = [[npm install yaml-language-server]],
- default_options = {
- cmd = { root_dir .. '/node_modules/.bin/yaml-language-server', '--stdio' },
- }
-}