diff options
| author | William Boman <william@redwill.se> | 2022-07-06 19:41:43 +0200 |
|---|---|---|
| committer | William Boman <william@redwill.se> | 2022-07-07 00:39:59 +0200 |
| commit | 5f634e0c37e723fc0c33e06b4fd5c2180178db40 (patch) | |
| tree | fa4f09363adefa8259e23e4d1ea036db628b1243 /lua/nvim-lsp-installer/servers | |
| parent | feat(health): use stderr for java version, also check for JAVA_HOME (#765) (diff) | |
| download | mason-5f634e0c37e723fc0c33e06b4fd5c2180178db40.tar mason-5f634e0c37e723fc0c33e06b4fd5c2180178db40.tar.gz mason-5f634e0c37e723fc0c33e06b4fd5c2180178db40.tar.bz2 mason-5f634e0c37e723fc0c33e06b4fd5c2180178db40.tar.lz mason-5f634e0c37e723fc0c33e06b4fd5c2180178db40.tar.xz mason-5f634e0c37e723fc0c33e06b4fd5c2180178db40.tar.zst mason-5f634e0c37e723fc0c33e06b4fd5c2180178db40.zip | |
mason.nvim
Diffstat (limited to 'lua/nvim-lsp-installer/servers')
134 files changed, 0 insertions, 4022 deletions
diff --git a/lua/nvim-lsp-installer/servers/angularls/init.lua b/lua/nvim-lsp-installer/servers/angularls/init.lua deleted file mode 100644 index c10d0a97..00000000 --- a/lua/nvim-lsp-installer/servers/angularls/init.lua +++ /dev/null @@ -1,49 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local platform = require "nvim-lsp-installer.core.platform" -local npm = require "nvim-lsp-installer.core.managers.npm" -local _ = require "nvim-lsp-installer.core.functional" -local path = require "nvim-lsp-installer.core.path" - -local append_node_modules = _.map(function(dir) - return path.concat { dir, "node_modules" } -end) - -return function(name, root_dir) - local function get_cmd(workspace_dir) - local cmd = { - "ngserver", - "--stdio", - "--tsProbeLocations", - table.concat(append_node_modules { root_dir, workspace_dir }, ","), - "--ngProbeLocations", - table.concat( - append_node_modules { - path.concat { root_dir, "node_modules", "@angular", "language-server" }, - workspace_dir, - }, - "," - ), - } - if platform.is_win then - table.insert(cmd, 1, "cmd.exe") - table.insert(cmd, 2, "/C") - end - - return cmd - end - - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://angular.io/guide/language-service", - languages = { "angular" }, - installer = npm.packages { "@angular/language-server", "typescript" }, - default_options = { - cmd = get_cmd(path.cwd()), - cmd_env = npm.env(root_dir), - on_new_config = function(new_config, new_root_dir) - new_config.cmd = get_cmd(new_root_dir) - end, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/ansiblels/init.lua b/lua/nvim-lsp-installer/servers/ansiblels/init.lua deleted file mode 100644 index d5208204..00000000 --- a/lua/nvim-lsp-installer/servers/ansiblels/init.lua +++ /dev/null @@ -1,23 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local path = require "nvim-lsp-installer.core.path" -local npm = require "nvim-lsp-installer.core.managers.npm" -local git = require "nvim-lsp-installer.core.managers.git" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "ansible" }, - homepage = "https://github.com/ansible/ansible-language-server", - installer = function() - git.clone({ "https://github.com/ansible/ansible-language-server" }).with_receipt() - -- ansiblels has quite a strict npm version requirement. - -- Install dependencies using the the latest npm version. - npm.exec { "npm@latest", "install" } - npm.run { "compile" } - end, - default_options = { - cmd = { "node", path.concat { root_dir, "out", "server", "src", "server.js" }, "--stdio" }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/apex_ls/init.lua b/lua/nvim-lsp-installer/servers/apex_ls/init.lua deleted file mode 100644 index 2ed778a9..00000000 --- a/lua/nvim-lsp-installer/servers/apex_ls/init.lua +++ /dev/null @@ -1,43 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local github = require "nvim-lsp-installer.core.managers.github" -local github_client = require "nvim-lsp-installer.core.managers.github.client" -local Optional = require "nvim-lsp-installer.core.optional" -local path = require "nvim-lsp-installer.core.path" -local _ = require "nvim-lsp-installer.core.functional" - -return function(name, root_dir) - local JAR_FILE = "apex-jorje-lsp.jar" - - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://github.com/forcedotcom/salesforcedx-vscode", - languages = { "apex" }, - ---@async - ---@param ctx InstallContext - installer = function(ctx) - local repo = "forcedotcom/salesforcedx-vscode" - - -- See https://github.com/forcedotcom/salesforcedx-vscode/issues/4184#issuecomment-1146052086 - ---@type GitHubRelease - local release = github_client - .fetch_releases(repo) - :map(_.find_first(_.prop_satisfies(_.compose(_.gt(0), _.length), "assets"))) - :map(Optional.of_nilable) - :get_or_throw() -- Result unwrap - :or_else_throw "Failed to find release with assets." -- Optional unwrap - - github.unzip_release_file({ - version = Optional.of(release.tag_name), - asset_file = _.compose(_.format "salesforcedx-vscode-apex-%s.vsix", _.gsub("^v", "")), - repo = repo, - }).with_receipt() - - ctx.fs:rename(path.concat { "extension", "out", JAR_FILE }, JAR_FILE) - ctx.fs:rmrf "extension" - end, - default_options = { - apex_jar_path = path.concat { root_dir, JAR_FILE }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/arduino_language_server/README.md b/lua/nvim-lsp-installer/servers/arduino_language_server/README.md deleted file mode 100644 index e229366b..00000000 --- a/lua/nvim-lsp-installer/servers/arduino_language_server/README.md +++ /dev/null @@ -1,68 +0,0 @@ -# arduino_language_server - -## Necessary extra configuration - -The Arduino Language Server does not come fully bootstrapped out of the box. In order for the language server to -successfully start, you need to provide which [FQBN](#FQBN) (e.g. "arduino:avr:nano") it should start with. - -This is done during server setup, and can be done by providing a custom `cmd`: - -```lua -local MY_FQBN = "arduino:avr:nano" -lspconfig.arduino_language_server.setup { - cmd = { - "arduino-language-server", - "-cli-config", "/path/to/arduino-cli.yaml", - "-fqbn", - MY_FQBN - } -} -``` - -### Dynamically changing FQBN per project - -```lua --- When the arduino server starts in these directories, use the provided FQBN. --- Note that the server needs to start exactly in these directories. --- This example would require some extra modification to support applying the FQBN on subdirectories! -local my_arduino_fqbn = { - ["/home/h4ck3r/dev/arduino/blink"] = "arduino:avr:nano", - ["/home/h4ck3r/dev/arduino/sensor"] = "arduino:mbed:nanorp2040connect", -} - -local DEFAULT_FQBN = "arduino:avr:uno" - -lspconfig.arduino_language_server.setup { - on_new_config = function (config, root_dir) - local fqbn = my_arduino_fqbn[root_dir] - if not fqbn then - vim.notify(("Could not find which FQBN to use in %q. Defaulting to %q."):format(root_dir, DEFAULT_FQBN)) - fqbn = DEFAULT_FQBN - end - config.cmd = { - "arduino-language-server", - "-cli-config", "/path/to/arduino-cli.yaml", - "-fqbn", - fqbn - } - end -} -``` - -## FQBN - -A FQBN, fully qualified board name, is used to distinguish between the various supported boards. Its format is defined -as `<package>:<architecture>:<board>`, where - -- `<package>` - vendor identifier; typically just `arduino` for Arduino boards -- `<architecture>` - microcontroller architecture; e.g., `avr`, `megaavr`, `sam`, etc. -- `<board>` - board name defined by the software; e.g., `uno`, `uno2018`, `yun`, etc. - -To identify the available FQBNs for boards you currently have connected, you may use the `arduino-cli` command, like so: - -```sh -$ arduino-cli board list -Port Protocol Type Board Name FQBN Core -/dev/ttyACM0 serial Serial Port (USB) Arduino Uno arduino:avr:uno arduino:avr - ^^^^^^^^^^^^^^^ -``` diff --git a/lua/nvim-lsp-installer/servers/arduino_language_server/init.lua b/lua/nvim-lsp-installer/servers/arduino_language_server/init.lua deleted file mode 100644 index 303a180f..00000000 --- a/lua/nvim-lsp-installer/servers/arduino_language_server/init.lua +++ /dev/null @@ -1,62 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local platform = require "nvim-lsp-installer.core.platform" -local functional = require "nvim-lsp-installer.core.functional" -local github = require "nvim-lsp-installer.core.managers.github" -local process = require "nvim-lsp-installer.core.process" - -local coalesce, when = functional.coalesce, functional.when - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://github.com/arduino/arduino-language-server", - languages = { "arduino" }, - installer = function() - local opts = { - repo = "arduino/arduino-language-server", - asset_file = function(release) - local target = coalesce( - when(platform.is_mac, "arduino-language-server_%s_macOS_64bit.tar.gz"), - when( - platform.is_linux and platform.arch == "x64", - "arduino-language-server_%s_Linux_64bit.tar.gz" - ), - when( - platform.is_linux and platform.arch == "x86", - "arduino-language-server_%s_Linux_32bit.tar.gz" - ), - when( - platform.is_linux and platform.arch == "arm64", - "arduino-language-server_%s_Linux_ARM64.tar.gz" - ), - when( - platform.is_win and platform.arch == "x64", - "arduino-language-server_0.6.0_Windows_64bit.zip" - ), - when( - platform.is_win and platform.arch == "x86", - "arduino-language-server_0.6.0_Windows_32bit.zip" - ) - ) - - return target and target:format(release) - end, - } - - platform.when { - unix = function() - github.untargz_release_file(opts).with_receipt() - end, - win = function() - github.unzip_release_file(opts).with_receipt() - end, - } - end, - default_options = { - cmd_env = { - PATH = process.extend_path { root_dir }, - }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/asm_lsp/init.lua b/lua/nvim-lsp-installer/servers/asm_lsp/init.lua deleted file mode 100644 index 63c64c63..00000000 --- a/lua/nvim-lsp-installer/servers/asm_lsp/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local cargo = require "nvim-lsp-installer.core.managers.cargo" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "assembly-gas", "assembly-nasm", "assembly-go" }, - homepage = "https://github.com/bergercookie/asm-lsp", - installer = cargo.crate "asm-lsp", - default_options = { - cmd_env = cargo.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/astro/init.lua b/lua/nvim-lsp-installer/servers/astro/init.lua deleted file mode 100644 index a2515738..00000000 --- a/lua/nvim-lsp-installer/servers/astro/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local npm = require "nvim-lsp-installer.core.managers.npm" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "astro" }, - homepage = "https://github.com/withastro/language-tools/tree/main/packages/language-server", - installer = npm.packages { "@astrojs/language-server" }, - default_options = { - cmd_env = npm.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/awk_ls/init.lua b/lua/nvim-lsp-installer/servers/awk_ls/init.lua deleted file mode 100644 index 457c6dbf..00000000 --- a/lua/nvim-lsp-installer/servers/awk_ls/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local npm = require "nvim-lsp-installer.core.managers.npm" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "awk" }, - homepage = "https://github.com/Beaglefoot/awk-language-server", - installer = npm.packages { "awk-language-server" }, - default_options = { - cmd_env = npm.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/bashls/init.lua b/lua/nvim-lsp-installer/servers/bashls/init.lua deleted file mode 100644 index 5d1c3735..00000000 --- a/lua/nvim-lsp-installer/servers/bashls/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local npm = require "nvim-lsp-installer.core.managers.npm" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "bash" }, - homepage = "https://github.com/bash-lsp/bash-language-server", - installer = npm.packages { "bash-language-server" }, - default_options = { - cmd_env = npm.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/beancount/init.lua b/lua/nvim-lsp-installer/servers/beancount/init.lua deleted file mode 100644 index bc35c080..00000000 --- a/lua/nvim-lsp-installer/servers/beancount/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local cargo = require "nvim-lsp-installer.core.managers.cargo" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "beancount" }, - homepage = "https://github.com/polarmutex/beancount-language-server", - installer = cargo.crate "beancount-language-server", - default_options = { - cmd_env = cargo.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/bicep/init.lua b/lua/nvim-lsp-installer/servers/bicep/init.lua deleted file mode 100644 index 78fff72d..00000000 --- a/lua/nvim-lsp-installer/servers/bicep/init.lua +++ /dev/null @@ -1,32 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local path = require "nvim-lsp-installer.core.path" -local std = require "nvim-lsp-installer.core.managers.std" -local github = require "nvim-lsp-installer.core.managers.github" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "bicep" }, - homepage = "https://github.com/Azure/bicep", - ---@param ctx InstallContext - installer = function(ctx) - std.ensure_executable("dotnet", { help_url = "https://dotnet.microsoft.com/download" }) - ctx.fs:mkdir "vscode" - ctx:chdir("vscode", function() - -- The bicep-langserver.zip is a bit broken on POSIX systems - so we download it via the VSCode distribution - -- instead. See https://github.com/Azure/bicep/issues/3704. - github.unzip_release_file({ - repo = "Azure/bicep", - asset_file = "vscode-bicep.vsix", - }).with_receipt() - end) - ctx.fs:rename(path.concat { "vscode", "extension", "bicepLanguageServer" }, "langserver") - ctx.fs:rmrf "vscode" - ctx:chdir "langserver" - end, - default_options = { - cmd = { "dotnet", path.concat { root_dir, "Bicep.LangServer.dll" } }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/bsl_ls/init.lua b/lua/nvim-lsp-installer/servers/bsl_ls/init.lua deleted file mode 100644 index 468f3ef6..00000000 --- a/lua/nvim-lsp-installer/servers/bsl_ls/init.lua +++ /dev/null @@ -1,31 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local path = require "nvim-lsp-installer.core.path" -local github = require "nvim-lsp-installer.core.managers.github" -local std = require "nvim-lsp-installer.core.managers.std" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://1c-syntax.github.io/bsl-language-server", - languages = { "onescript" }, - installer = function() - std.ensure_executable "java" - github.download_release_file({ - repo = "1c-syntax/bsl-language-server", - out_file = "bsl-lsp.jar", - asset_file = function(release) - local version = release:gsub("^v", "") - return ("bsl-language-server-%s-exec.jar"):format(version) - end, - }).with_receipt() - end, - default_options = { - cmd = { - "java", - "-jar", - path.concat { root_dir, "bsl-lsp.jar" }, - }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/ccls/common.lua b/lua/nvim-lsp-installer/servers/ccls/common.lua deleted file mode 100644 index 666a2a6a..00000000 --- a/lua/nvim-lsp-installer/servers/ccls/common.lua +++ /dev/null @@ -1,41 +0,0 @@ -local path = require "nvim-lsp-installer.core.path" -local platform = require "nvim-lsp-installer.core.platform" -local installer = require "nvim-lsp-installer.core.installer" -local git = require "nvim-lsp-installer.core.managers.git" -local Optional = require "nvim-lsp-installer.core.optional" - ----@async ----@param opts {llvm_dir: string} -return function(opts) - local ctx = installer.context() - local clang_resource_dir = path.concat { ctx.destination_dir, "clang-resource" } - local install_prefix = ctx.cwd:get() - - ctx.fs:mkdir "ccls-git" - ctx:chdir("ccls-git", function() - git.clone { "https://github.com/MaskRay/ccls", recursive = true } - ctx.spawn.cmake { - "-DCMAKE_BUILD_TYPE=Release", - "-DUSE_SYSTEM_RAPIDJSON=OFF", - "-DCMAKE_FIND_FRAMEWORK=LAST", - "-Wno-dev", - ("-DCMAKE_INSTALL_PREFIX=%s"):format(install_prefix), - Optional.of_nilable(opts.llvm_dir) - :map(function(llvm_dir) - return { - ("-DCMAKE_PREFIX_PATH=%s"):format(llvm_dir), - -- On Mac we use Homebrew LLVM which will persist after installation. - -- On Linux, and when a custom llvm_dir is provided, its clang resource dir will be the only - -- artifact persisted after installation, as the locally installed llvm installation will be - -- cleaned up after compilation. - not platform.is_mac and ("-DCLANG_RESOURCE_DIR=%s"):format(clang_resource_dir) or vim.NIL, - } - end) - :or_else(vim.NIL), - platform.is_mac and "-DCMAKE_OSX_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk" or vim.NIL, - } - - ctx.spawn.make { "install" } - end) - ctx.fs:rmrf "ccls-git" -end diff --git a/lua/nvim-lsp-installer/servers/ccls/init.lua b/lua/nvim-lsp-installer/servers/ccls/init.lua deleted file mode 100644 index 4302e58e..00000000 --- a/lua/nvim-lsp-installer/servers/ccls/init.lua +++ /dev/null @@ -1,24 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local path = require "nvim-lsp-installer.core.path" -local platform = require "nvim-lsp-installer.core.platform" -local process = require "nvim-lsp-installer.core.process" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://github.com/MaskRay/ccls", - languages = { "c", "c++", "objective-c" }, - installer = function() - platform.when { - mac = require "nvim-lsp-installer.servers.ccls.mac", - linux = require "nvim-lsp-installer.servers.ccls.linux", - } - end, - default_options = { - cmd_env = { - PATH = process.extend_path { path.concat { root_dir, "bin" } }, - }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/ccls/linux.lua b/lua/nvim-lsp-installer/servers/ccls/linux.lua deleted file mode 100644 index 44bd29ca..00000000 --- a/lua/nvim-lsp-installer/servers/ccls/linux.lua +++ /dev/null @@ -1,73 +0,0 @@ -local path = require "nvim-lsp-installer.core.path" -local platform = require "nvim-lsp-installer.core.platform" -local installer = require "nvim-lsp-installer.core.installer" -local github = require "nvim-lsp-installer.core.managers.github" -local functional = require "nvim-lsp-installer.core.functional" -local Result = require "nvim-lsp-installer.core.result" -local Optional = require "nvim-lsp-installer.core.optional" - -local ccls_installer = require "nvim-lsp-installer.servers.ccls.common" - -local coalesce, when = functional.coalesce, functional.when - ----@param release string -local function normalize_llvm_release(release) - -- Strip the "llvmorg-" prefix from tags (llvm releases tags like llvmorg-13.0.0) - local normalized_release = release:gsub("^llvmorg%-", "") - return normalized_release -end - ----@async -local function llvm_installer() - local ctx = installer.context() - local os_dist = platform.os_distribution() - - local asset_name = coalesce( - when( - platform.arch == "x64", - coalesce( - when( - os_dist.id == "ubuntu" and os_dist.version.major >= 20, - "clang+llvm-%s-x86_64-linux-gnu-ubuntu-20.04" - ), - when( - os_dist.id == "ubuntu" and os_dist.version.major >= 16, - "clang+llvm-%s-x86_64-linux-gnu-ubuntu-16.04" - ) - ) - ), - when(platform.arch == "arm64", "clang+llvm-%s-aarch64-linux-gnu"), - when(platform.arch == "armv7", "clang+llvm-%s-armv7a-linux-gnueabihf") - ) - - local source = github.untarxz_release_file { - repo = "llvm/llvm-project", - version = Optional.of "llvmorg-13.0.0", - asset_file = function(release) - local normalized_release = normalize_llvm_release(release) - return asset_name and ("%s.tar.xz"):format(asset_name):format(normalized_release) - end, - } - - ctx.fs:rename(asset_name:format(normalize_llvm_release(source.release)), "llvm") - -- We move the clang headers out, because they need to be persisted - ctx.fs:rename(path.concat { "llvm", "lib", "clang", normalize_llvm_release(source.release) }, "clang-resource") - - return path.concat { ctx.cwd:get(), "llvm" } -end - ----@async -return function() - local ctx = installer.context() - Result.run_catching(llvm_installer) - :map(function(llvm_dir) - ccls_installer { llvm_dir = llvm_dir } - ctx.fs:rmrf "llvm" - end) - :recover(function() - pcall(function() - ctx.fs:rmrf "llvm" - end) - ccls_installer {} - end) -end diff --git a/lua/nvim-lsp-installer/servers/ccls/mac.lua b/lua/nvim-lsp-installer/servers/ccls/mac.lua deleted file mode 100644 index b9b482b7..00000000 --- a/lua/nvim-lsp-installer/servers/ccls/mac.lua +++ /dev/null @@ -1,22 +0,0 @@ -local path = require "nvim-lsp-installer.core.path" -local platform = require "nvim-lsp-installer.core.platform" -local installer = require "nvim-lsp-installer.core.installer" -local fs = require "nvim-lsp-installer.core.fs" - -local ccls_installer = require "nvim-lsp-installer.servers.ccls.common" - ----@async -return function() - local ctx = installer.context() - local homebrew_prefix = platform.get_homebrew_prefix():get_or_throw() - local llvm_dir = path.concat { homebrew_prefix, "opt", "llvm", "lib", "cmake" } - if not fs.async.dir_exists(llvm_dir) then - ctx.stdio_sink.stderr( - ( - "LLVM does not seem to be installed on this system (looked in %q). Please install LLVM via Homebrew:\n $ brew install llvm\n" - ):format(llvm_dir) - ) - error "Unable to find LLVM." - end - ccls_installer { llvm_dir = llvm_dir } -end diff --git a/lua/nvim-lsp-installer/servers/clangd/init.lua b/lua/nvim-lsp-installer/servers/clangd/init.lua deleted file mode 100644 index 40b4795d..00000000 --- a/lua/nvim-lsp-installer/servers/clangd/init.lua +++ /dev/null @@ -1,38 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local path = require "nvim-lsp-installer.core.path" -local process = require "nvim-lsp-installer.core.process" -local functional = require "nvim-lsp-installer.core.functional" -local platform = require "nvim-lsp-installer.core.platform" -local github = require "nvim-lsp-installer.core.managers.github" - -local coalesce, when = functional.coalesce, functional.when - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://clangd.llvm.org", - languages = { "c", "c++" }, - ---@param ctx InstallContext - installer = function(ctx) - local source = github.unzip_release_file { - repo = "clangd/clangd", - asset_file = function(release) - local target = coalesce( - when(platform.is_mac, "clangd-mac-%s.zip"), - when(platform.is_linux and platform.arch == "x64", "clangd-linux-%s.zip"), - when(platform.is_win, "clangd-windows-%s.zip") - ) - return target and target:format(release) - end, - } - source.with_receipt() - ctx.fs:rename(("clangd_%s"):format(source.release), "clangd") - end, - default_options = { - cmd_env = { - PATH = process.extend_path { path.concat { root_dir, "clangd", "bin" } }, - }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/clarity_lsp/init.lua b/lua/nvim-lsp-installer/servers/clarity_lsp/init.lua deleted file mode 100644 index e9a4ccaf..00000000 --- a/lua/nvim-lsp-installer/servers/clarity_lsp/init.lua +++ /dev/null @@ -1,31 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local process = require "nvim-lsp-installer.core.process" -local platform = require "nvim-lsp-installer.core.platform" -local github = require "nvim-lsp-installer.core.managers.github" -local functional = require "nvim-lsp-installer.core.functional" - -local coalesce, when = functional.coalesce, functional.when - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://github.com/hirosystems/clarity-lsp", - languages = { "clarity" }, - installer = function() - github.unzip_release_file({ - repo = "hirosystems/clarity-lsp", - asset_file = coalesce( - when(platform.is_mac, "clarity-lsp-macos-x64.zip"), - when(platform.is_linux and platform.arch == "x64", "clarity-lsp-linux-x64.zip"), - when(platform.is_win and platform.arch == "x64", "clarity-lsp-windows-x64.zip") - ), - }).with_receipt() - end, - default_options = { - cmd_env = { - PATH = process.extend_path { root_dir }, - }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/clojure_lsp/init.lua b/lua/nvim-lsp-installer/servers/clojure_lsp/init.lua deleted file mode 100644 index ecf32ff7..00000000 --- a/lua/nvim-lsp-installer/servers/clojure_lsp/init.lua +++ /dev/null @@ -1,33 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local process = require "nvim-lsp-installer.core.process" -local functional = require "nvim-lsp-installer.core.functional" -local platform = require "nvim-lsp-installer.core.platform" -local github = require "nvim-lsp-installer.core.managers.github" -local std = require "nvim-lsp-installer.core.managers.std" - -local coalesce, when = functional.coalesce, functional.when - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://clojure-lsp.io", - languages = { "clojure" }, - installer = function() - github.unzip_release_file({ - repo = "clojure-lsp/clojure-lsp", - asset_file = coalesce( - when(platform.is_mac, "clojure-lsp-native-macos-amd64.zip"), - when(platform.is_linux, "clojure-lsp-native-linux-amd64.zip"), - when(platform.is_win, "clojure-lsp-native-windows-amd64.zip") - ), - }).with_receipt() - std.chmod("+x", { "clojure-lsp" }) - end, - default_options = { - cmd_env = { - PATH = process.extend_path { root_dir }, - }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/cmake/init.lua b/lua/nvim-lsp-installer/servers/cmake/init.lua deleted file mode 100644 index 5ef7ed21..00000000 --- a/lua/nvim-lsp-installer/servers/cmake/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local pip3 = require "nvim-lsp-installer.core.managers.pip3" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://github.com/regen100/cmake-language-server", - languages = { "cmake" }, - installer = pip3.packages { "cmake-language-server" }, - default_options = { - cmd_env = pip3.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/codeqlls/init.lua b/lua/nvim-lsp-installer/servers/codeqlls/init.lua deleted file mode 100644 index ccae55c0..00000000 --- a/lua/nvim-lsp-installer/servers/codeqlls/init.lua +++ /dev/null @@ -1,31 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local functional = require "nvim-lsp-installer.core.functional" -local platform = require "nvim-lsp-installer.core.platform" -local github = require "nvim-lsp-installer.core.managers.github" -local process = require "nvim-lsp-installer.core.process" -local path = require "nvim-lsp-installer.core.path" - -local coalesce, when = functional.coalesce, functional.when - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "codeql" }, - installer = function() - github.unzip_release_file({ - repo = "github/codeql-cli-binaries", - asset_file = coalesce( - when(platform.is_mac, "codeql-osx64.zip"), - when(platform.is_unix, "codeql-linux64.zip"), - when(platform.is_win, "codeql-win64.zip") - ), - }).with_receipt() - end, - default_options = { - cmd_env = { - PATH = process.extend_path { path.concat { root_dir, "codeql" } }, - }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/crystalline/init.lua b/lua/nvim-lsp-installer/servers/crystalline/init.lua deleted file mode 100644 index 3e70cf7e..00000000 --- a/lua/nvim-lsp-installer/servers/crystalline/init.lua +++ /dev/null @@ -1,34 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local process = require "nvim-lsp-installer.core.process" -local platform = require "nvim-lsp-installer.core.platform" -local functional = require "nvim-lsp-installer.core.functional" -local path = require "nvim-lsp-installer.core.path" -local github = require "nvim-lsp-installer.core.managers.github" -local std = require "nvim-lsp-installer.core.managers.std" - -local coalesce, when = functional.coalesce, functional.when - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://github.com/elbywan/crystalline", - languages = { "crystal" }, - installer = function() - github.gunzip_release_file({ - repo = "elbywan/crystalline", - asset_file = coalesce( - when(platform.is_mac and platform.arch == "x64", "crystalline_x86_64-apple-darwin.gz"), - when(platform.is_linux and platform.arch == "x64", "crystalline_x86_64-unknown-linux-gnu.gz") - ), - out_file = "crystalline", - }).with_receipt() - std.chmod("+x", { "crystalline" }) - end, - default_options = { - cmd_env = { - PATH = process.extend_path { root_dir, path.concat { root_dir, "crystal", "bin" } }, - }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/csharp_ls/init.lua b/lua/nvim-lsp-installer/servers/csharp_ls/init.lua deleted file mode 100644 index a39ab8e8..00000000 --- a/lua/nvim-lsp-installer/servers/csharp_ls/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local dotnet = require "nvim-lsp-installer.core.managers.dotnet" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "c#" }, - homepage = "https://github.com/razzmatazz/csharp-language-server", - installer = dotnet.package "csharp-ls", - default_options = { - cmd_env = dotnet.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/cssls/init.lua b/lua/nvim-lsp-installer/servers/cssls/init.lua deleted file mode 100644 index 0f2c7e0c..00000000 --- a/lua/nvim-lsp-installer/servers/cssls/init.lua +++ /dev/null @@ -1 +0,0 @@ -return require "nvim-lsp-installer.servers.vscode-langservers-extracted" { "css" } diff --git a/lua/nvim-lsp-installer/servers/cssmodules_ls/init.lua b/lua/nvim-lsp-installer/servers/cssmodules_ls/init.lua deleted file mode 100644 index 28b0e232..00000000 --- a/lua/nvim-lsp-installer/servers/cssmodules_ls/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local npm = require "nvim-lsp-installer.core.managers.npm" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://github.com/antonk52/cssmodules-language-server", - languages = { "css" }, - installer = npm.packages { "cssmodules-language-server" }, - default_options = { - cmd_env = npm.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/cucumber_language_server/init.lua b/lua/nvim-lsp-installer/servers/cucumber_language_server/init.lua deleted file mode 100644 index d4badc5d..00000000 --- a/lua/nvim-lsp-installer/servers/cucumber_language_server/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local npm = require "nvim-lsp-installer.core.managers.npm" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "cucumber" }, - homepage = "https://github.com/cucumber/language-server", - installer = npm.packages { "@cucumber/language-server" }, - default_options = { - cmd_env = npm.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/dartls/init.lua b/lua/nvim-lsp-installer/servers/dartls/init.lua deleted file mode 100644 index 04f761e1..00000000 --- a/lua/nvim-lsp-installer/servers/dartls/init.lua +++ /dev/null @@ -1,13 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local std = require "nvim-lsp-installer.core.managers.std" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://github.com/dart-lang/sdk", - languages = { "dart" }, - installer = std.system_executable("dart", { help_url = "https://dart.dev/get-dart" }), - default_options = {}, - } -end diff --git a/lua/nvim-lsp-installer/servers/denols/init.lua b/lua/nvim-lsp-installer/servers/denols/init.lua deleted file mode 100644 index f4d64b2a..00000000 --- a/lua/nvim-lsp-installer/servers/denols/init.lua +++ /dev/null @@ -1,37 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local process = require "nvim-lsp-installer.core.process" -local platform = require "nvim-lsp-installer.core.platform" -local functional = require "nvim-lsp-installer.core.functional" -local github = require "nvim-lsp-installer.core.managers.github" - -local coalesce, when = functional.coalesce, functional.when - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://deno.land/x/deno/cli/lsp", - languages = { "deno" }, - installer = function() - github.unzip_release_file({ - repo = "denoland/deno", - asset_file = coalesce( - when( - platform.is_mac, - coalesce( - when(platform.arch == "arm64", "deno-aarch64-apple-darwin.zip"), - when(platform.arch == "x64", "deno-x86_64-apple-darwin.zip") - ) - ), - when(platform.is_linux, "deno-x86_64-unknown-linux-gnu.zip"), - when(platform.is_win, "deno-x86_64-pc-windows-msvc.zip") - ), - }).with_receipt() - end, - default_options = { - cmd_env = { - PATH = process.extend_path { root_dir }, - }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/dhall_lsp_server/init.lua b/lua/nvim-lsp-installer/servers/dhall_lsp_server/init.lua deleted file mode 100644 index 484ae389..00000000 --- a/lua/nvim-lsp-installer/servers/dhall_lsp_server/init.lua +++ /dev/null @@ -1,68 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local path = require "nvim-lsp-installer.core.path" -local process = require "nvim-lsp-installer.core.process" -local platform = require "nvim-lsp-installer.core.platform" -local _ = require "nvim-lsp-installer.core.functional" -local std = require "nvim-lsp-installer.core.managers.std" -local github_client = require "nvim-lsp-installer.core.managers.github.client" -local Optional = require "nvim-lsp-installer.core.optional" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://dhall-lang.org/", - languages = { "dhall" }, - ---@param ctx InstallContext - installer = function(ctx) - local repo = "dhall-lang/dhall-haskell" - ---@type GitHubRelease - local gh_release = ctx.requested_version - :map(function(version) - return github_client.fetch_release(repo, version) - end) - :or_else_get(function() - return github_client.fetch_latest_release(repo) - end) - :get_or_throw() - - local asset_name_pattern = assert( - _.coalesce( - _.when(platform.is.mac, "dhall%-lsp%-server%-.+%-x86_64%-macos.tar.bz2"), - _.when(platform.is.linux_x64, "dhall%-lsp%-server%-.+%-x86_64%-linux.tar.bz2"), - _.when(platform.is.win_x64, "dhall%-lsp%-server%-.+%-x86_64%-windows.zip") - ) - ) - local dhall_lsp_server_asset = _.find_first( - _.prop_satisfies(_.matches(asset_name_pattern), "name"), - gh_release.assets - ) - Optional.of_nilable(dhall_lsp_server_asset) - :if_present( - ---@param asset GitHubReleaseAsset - function(asset) - if platform.is_win then - std.download_file(asset.browser_download_url, "dhall-lsp-server.zip") - std.unzip("dhall-lsp-server.zip", ".") - else - std.download_file(asset.browser_download_url, "dhall-lsp-server.tar.bz2") - std.untar "dhall-lsp-server.tar.bz2" - std.chmod("+x", { path.concat { "bin", "dhall-lsp-server" } }) - end - ctx.receipt:with_primary_source { - type = "github_release_file", - repo = repo, - file = asset.browser_download_url, - release = gh_release.tag_name, - } - end - ) - :or_else_throw "Unable to find the dhall-lsp-server release asset in the GitHub release." - end, - default_options = { - cmd_env = { - PATH = process.extend_path { path.concat { root_dir, "bin" } }, - }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/diagnosticls/init.lua b/lua/nvim-lsp-installer/servers/diagnosticls/init.lua deleted file mode 100644 index bbb6cf27..00000000 --- a/lua/nvim-lsp-installer/servers/diagnosticls/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local npm = require "nvim-lsp-installer.core.managers.npm" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = {}, - homepage = "https://github.com/iamcco/diagnostic-languageserver", - installer = npm.packages { "diagnostic-languageserver" }, - default_options = { - cmd_env = npm.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/dockerls/init.lua b/lua/nvim-lsp-installer/servers/dockerls/init.lua deleted file mode 100644 index 466b9e0f..00000000 --- a/lua/nvim-lsp-installer/servers/dockerls/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local npm = require "nvim-lsp-installer.core.managers.npm" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://github.com/rcjsuen/dockerfile-language-server-nodejs", - languages = { "docker" }, - installer = npm.packages { "dockerfile-language-server-nodejs" }, - default_options = { - cmd_env = npm.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/dotls/init.lua b/lua/nvim-lsp-installer/servers/dotls/init.lua deleted file mode 100644 index 0ffd8dab..00000000 --- a/lua/nvim-lsp-installer/servers/dotls/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local npm = require "nvim-lsp-installer.core.managers.npm" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://github.com/nikeee/dot-language-server", - languages = { "dot" }, - installer = npm.packages { "dot-language-server" }, - default_options = { - cmd_env = npm.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/efm/init.lua b/lua/nvim-lsp-installer/servers/efm/init.lua deleted file mode 100644 index 6c431bee..00000000 --- a/lua/nvim-lsp-installer/servers/efm/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local go = require "nvim-lsp-installer.core.managers.go" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://github.com/mattn/efm-langserver", - languages = {}, - installer = go.packages { "github.com/mattn/efm-langserver" }, - default_options = { - cmd_env = go.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/elixirls/init.lua b/lua/nvim-lsp-installer/servers/elixirls/init.lua deleted file mode 100644 index fc98dce7..00000000 --- a/lua/nvim-lsp-installer/servers/elixirls/init.lua +++ /dev/null @@ -1,35 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local path = require "nvim-lsp-installer.core.path" -local platform = require "nvim-lsp-installer.core.platform" -local github = require "nvim-lsp-installer.core.managers.github" -local std = require "nvim-lsp-installer.core.managers.std" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://github.com/elixir-lsp/elixir-ls", - languages = { "elixir" }, - ---@param ctx InstallContext - installer = function(ctx) - -- We write to the elixir-ls directory for backwards compatibility reasons - ctx.fs:mkdir "elixir-ls" - ctx:chdir("elixir-ls", function() - github.unzip_release_file({ - repo = "elixir-lsp/elixir-ls", - asset_file = "elixir-ls.zip", - }).with_receipt() - std.chmod("+x", { "language_server.sh" }) - end) - end, - default_options = { - cmd = { - path.concat { - root_dir, - "elixir-ls", - platform.is_win and "language_server.bat" or "language_server.sh", - }, - }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/elmls/init.lua b/lua/nvim-lsp-installer/servers/elmls/init.lua deleted file mode 100644 index 7323a475..00000000 --- a/lua/nvim-lsp-installer/servers/elmls/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local npm = require "nvim-lsp-installer.core.managers.npm" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://github.com/elm-tooling/elm-language-server", - languages = { "elm" }, - installer = npm.packages { "@elm-tooling/elm-language-server", "elm", "elm-test", "elm-format" }, - default_options = { - cmd_env = npm.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/ember/init.lua b/lua/nvim-lsp-installer/servers/ember/init.lua deleted file mode 100644 index 63eb4fc2..00000000 --- a/lua/nvim-lsp-installer/servers/ember/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local npm = require "nvim-lsp-installer.core.managers.npm" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "ember" }, - homepage = "https://github.com/lifeart/ember-language-server", - installer = npm.packages { "@lifeart/ember-language-server" }, - default_options = { - cmd_env = npm.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/emmet_ls/init.lua b/lua/nvim-lsp-installer/servers/emmet_ls/init.lua deleted file mode 100644 index 404fe6e2..00000000 --- a/lua/nvim-lsp-installer/servers/emmet_ls/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local npm = require "nvim-lsp-installer.core.managers.npm" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://github.com/aca/emmet-ls", - languages = { "emmet" }, - installer = npm.packages { "emmet-ls" }, - default_options = { - cmd_env = npm.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/erlangls/init.lua b/lua/nvim-lsp-installer/servers/erlangls/init.lua deleted file mode 100644 index 2ae7403a..00000000 --- a/lua/nvim-lsp-installer/servers/erlangls/init.lua +++ /dev/null @@ -1,36 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local path = require "nvim-lsp-installer.core.path" -local process = require "nvim-lsp-installer.core.process" -local platform = require "nvim-lsp-installer.core.platform" -local std = require "nvim-lsp-installer.core.managers.std" -local git = require "nvim-lsp-installer.core.managers.git" -local github = require "nvim-lsp-installer.core.managers.github" -local Optional = require "nvim-lsp-installer.core.optional" - -return function(name, root_dir) - local rebar3 = platform.is_win and "rebar3.cmd" or "rebar3" - - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "erlang" }, - homepage = "https://erlang-ls.github.io/", - ---@param ctx InstallContext - installer = function(ctx) - std.ensure_executable(rebar3, { help_url = "http://rebar3.org/docs/" }) - - local repo = "erlang-ls/erlang_ls" - local source = github.tag { repo = repo } - source.with_receipt() - git.clone { ("https://github.com/%s.git"):format(repo), version = Optional.of(source.tag) } - - ctx.spawn[rebar3] { "escriptize" } - ctx.spawn[rebar3] { "as", "dap", "escriptize" } - end, - default_options = { - cmd_env = { - PATH = process.extend_path { path.concat { root_dir, "_build", "default", "bin" } }, - }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/esbonio/init.lua b/lua/nvim-lsp-installer/servers/esbonio/init.lua deleted file mode 100644 index 06df4e5c..00000000 --- a/lua/nvim-lsp-installer/servers/esbonio/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local pip3 = require "nvim-lsp-installer.core.managers.pip3" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "sphinx" }, - homepage = "https://pypi.org/project/esbonio/", - installer = pip3.packages { "esbonio" }, - default_options = { - cmd_env = pip3.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/eslint/README.md b/lua/nvim-lsp-installer/servers/eslint/README.md deleted file mode 100644 index a8c2a301..00000000 --- a/lua/nvim-lsp-installer/servers/eslint/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# eslint - -*NOTE*: You will have to install the [`eslint` package](https://www.npmjs.com/package/eslint) either locally or globally for the server to run successfully. - -## Eslint in projects that use pnp - -To allow the `eslint` server to resolve eslint and eslint plugins in a project that uses yarn 2/pnp, you need to manually change the -command used to run the server. This is done when setting up the LSP server, like so: - -```lua -local eslint_config = require("lspconfig.server_configurations.eslint") -lspconfig.eslint.setup { - opts.cmd = { "yarn", "exec", unpack(eslint_config.default_config.cmd) } -} -``` diff --git a/lua/nvim-lsp-installer/servers/eslint/init.lua b/lua/nvim-lsp-installer/servers/eslint/init.lua deleted file mode 100644 index 8fcb06fe..00000000 --- a/lua/nvim-lsp-installer/servers/eslint/init.lua +++ /dev/null @@ -1 +0,0 @@ -return require "nvim-lsp-installer.servers.vscode-langservers-extracted" { "eslint", "javascript", "typescript" } diff --git a/lua/nvim-lsp-installer/servers/flux_lsp/init.lua b/lua/nvim-lsp-installer/servers/flux_lsp/init.lua deleted file mode 100644 index d47e4a44..00000000 --- a/lua/nvim-lsp-installer/servers/flux_lsp/init.lua +++ /dev/null @@ -1,17 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local cargo = require "nvim-lsp-installer.core.managers.cargo" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "flux" }, - homepage = "https://github.com/influxdata/flux-lsp", - installer = cargo.crate("https://github.com/influxdata/flux-lsp", { - git = true, - }), - default_options = { - cmd_env = cargo.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/foam_ls/init.lua b/lua/nvim-lsp-installer/servers/foam_ls/init.lua deleted file mode 100644 index 79c09118..00000000 --- a/lua/nvim-lsp-installer/servers/foam_ls/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local npm = require "nvim-lsp-installer.core.managers.npm" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://github.com/FoamScience/foam-language-server", - languages = { "foam", "OpenFOAM" }, - installer = npm.packages { "foam-language-server" }, - default_options = { - cmd_env = npm.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/fortls/init.lua b/lua/nvim-lsp-installer/servers/fortls/init.lua deleted file mode 100644 index 24b76dce..00000000 --- a/lua/nvim-lsp-installer/servers/fortls/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local pip3 = require "nvim-lsp-installer.core.managers.pip3" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://github.com/gnikit/fortls", - languages = { "fortran" }, - installer = pip3.packages { "fortls" }, - default_options = { - cmd_env = pip3.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/fsautocomplete/init.lua b/lua/nvim-lsp-installer/servers/fsautocomplete/init.lua deleted file mode 100644 index d404e89f..00000000 --- a/lua/nvim-lsp-installer/servers/fsautocomplete/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local dotnet = require "nvim-lsp-installer.core.managers.dotnet" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "f#" }, - homepage = "https://github.com/fsharp/FsAutoComplete", - installer = dotnet.package "fsautocomplete", - default_options = { - cmd_env = dotnet.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/golangci_lint_ls/init.lua b/lua/nvim-lsp-installer/servers/golangci_lint_ls/init.lua deleted file mode 100644 index 58a85391..00000000 --- a/lua/nvim-lsp-installer/servers/golangci_lint_ls/init.lua +++ /dev/null @@ -1,18 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local go = require "nvim-lsp-installer.core.managers.go" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://github.com/nametake/golangci-lint-langserver", - languages = { "go" }, - installer = go.packages { - "github.com/nametake/golangci-lint-langserver", - "github.com/golangci/golangci-lint/cmd/golangci-lint", - }, - default_options = { - cmd_env = go.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/gopls/init.lua b/lua/nvim-lsp-installer/servers/gopls/init.lua deleted file mode 100644 index f83dbc65..00000000 --- a/lua/nvim-lsp-installer/servers/gopls/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local go = require "nvim-lsp-installer.core.managers.go" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://pkg.go.dev/golang.org/x/tools/gopls", - languages = { "go" }, - installer = go.packages { "golang.org/x/tools/gopls" }, - default_options = { - cmd_env = go.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/grammarly/init.lua b/lua/nvim-lsp-installer/servers/grammarly/init.lua deleted file mode 100644 index bd47ccab..00000000 --- a/lua/nvim-lsp-installer/servers/grammarly/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local npm = require "nvim-lsp-installer.core.managers.npm" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://github.com/znck/grammarly", - languages = {}, - installer = npm.packages { "grammarly-languageserver" }, - default_options = { - cmd_env = npm.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/graphql/init.lua b/lua/nvim-lsp-installer/servers/graphql/init.lua deleted file mode 100644 index 115478cb..00000000 --- a/lua/nvim-lsp-installer/servers/graphql/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local npm = require "nvim-lsp-installer.core.managers.npm" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://www.npmjs.com/package/graphql-language-service-cli", - languages = { "graphql" }, - installer = npm.packages { "graphql-language-service-cli", "graphql" }, - default_options = { - cmd_env = npm.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/groovyls/init.lua b/lua/nvim-lsp-installer/servers/groovyls/init.lua deleted file mode 100644 index 28316518..00000000 --- a/lua/nvim-lsp-installer/servers/groovyls/init.lua +++ /dev/null @@ -1,26 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local path = require "nvim-lsp-installer.core.path" -local std = require "nvim-lsp-installer.core.managers.std" -local git = require "nvim-lsp-installer.core.managers.git" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "groovy" }, - homepage = "https://github.com/GroovyLanguageServer/groovy-language-server", - ---@param ctx InstallContext - installer = function(ctx) - std.ensure_executable "javac" - git.clone({ "https://github.com/GroovyLanguageServer/groovy-language-server" }).with_receipt() - ctx:promote_cwd() - ctx.spawn.gradlew { - "build", - with_paths = { ctx.cwd:get() }, - } - end, - default_options = { - cmd = { "java", "-jar", path.concat { root_dir, "build", "libs", "groovyls-all.jar" } }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/haxe_language_server/init.lua b/lua/nvim-lsp-installer/servers/haxe_language_server/init.lua deleted file mode 100644 index b26e76df..00000000 --- a/lua/nvim-lsp-installer/servers/haxe_language_server/init.lua +++ /dev/null @@ -1,24 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local path = require "nvim-lsp-installer.core.path" -local std = require "nvim-lsp-installer.core.managers.std" -local git = require "nvim-lsp-installer.core.managers.git" -local npm = require "nvim-lsp-installer.core.managers.npm" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://github.com/vshaxe/haxe-language-server", - languages = { "haxe" }, - ---@param ctx InstallContext - installer = function(ctx) - std.ensure_executable("haxelib", { help_url = "https://haxe.org" }) - git.clone({ "https://github.com/vshaxe/haxe-language-server" }).with_receipt() - ctx.spawn.npm { "install" } - npm.exec { "lix", "run", "vshaxe-build", "-t", "language-server" } - end, - default_options = { - cmd = { "node", path.concat { root_dir, "bin", "server.js" } }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/hls/init.lua b/lua/nvim-lsp-installer/servers/hls/init.lua deleted file mode 100644 index fe3cd3d0..00000000 --- a/lua/nvim-lsp-installer/servers/hls/init.lua +++ /dev/null @@ -1,42 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local platform = require "nvim-lsp-installer.core.platform" -local process = require "nvim-lsp-installer.core.process" -local std = require "nvim-lsp-installer.core.managers.std" -local github_client = require "nvim-lsp-installer.core.managers.github.client" -local path = require "nvim-lsp-installer.core.path" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://haskell-language-server.readthedocs.io/en/latest/", - languages = { "haskell" }, - ---@param ctx InstallContext - installer = function(ctx) - local repo = "haskell/haskell-language-server" - local release = ctx.requested_version:or_else_get(function() - return github_client.fetch_latest_release(repo) - :map( - ---@param release GitHubRelease - function(release) - return release.tag_name - end - ) - :get_or_throw() - end) - - std.ensure_executable("ghcup", { help_url = "https://www.haskell.org/ghcup/" }) - ctx:promote_cwd() - ctx.spawn.ghcup { "install", "hls", release, "-i", ctx.cwd:get() } - - ctx.receipt:with_primary_source(ctx.receipt.github_release(repo, release)) - end, - default_options = { - cmd_env = { - PATH = process.extend_path { - platform.is_win and root_dir or path.concat { root_dir, "bin" }, - }, - }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/hoon_ls/init.lua b/lua/nvim-lsp-installer/servers/hoon_ls/init.lua deleted file mode 100644 index 630595a6..00000000 --- a/lua/nvim-lsp-installer/servers/hoon_ls/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local npm = require "nvim-lsp-installer.core.managers.npm" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "hoon" }, - homepage = "https://github.com/urbit/hoon-language-server", - installer = npm.packages { "@urbit/hoon-language-server" }, - default_options = { - cmd_env = npm.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/html/init.lua b/lua/nvim-lsp-installer/servers/html/init.lua deleted file mode 100644 index 37c6e7a9..00000000 --- a/lua/nvim-lsp-installer/servers/html/init.lua +++ /dev/null @@ -1 +0,0 @@ -return require "nvim-lsp-installer.servers.vscode-langservers-extracted" { "html" } diff --git a/lua/nvim-lsp-installer/servers/init.lua b/lua/nvim-lsp-installer/servers/init.lua deleted file mode 100644 index 935366e4..00000000 --- a/lua/nvim-lsp-installer/servers/init.lua +++ /dev/null @@ -1,297 +0,0 @@ -local _ = require "nvim-lsp-installer.core.functional" -local path = require "nvim-lsp-installer.core.path" -local fs = require "nvim-lsp-installer.core.fs" -local settings = require "nvim-lsp-installer.settings" -local log = require "nvim-lsp-installer.log" - -local M = {} - --- By default the install dir will be the same as the server's name. --- There are two cases when servers should install to a different location: --- 1. Legacy reasons, where some servers were previously installed to a location different than their name --- 2. There is a breaking change to a server that motivates changing its install dir (e.g. to "bust" existing installations). -local INSTALL_DIRS = { - ["bashls"] = "bash", - ["dockerls"] = "dockerfile", - ["elixirls"] = "elixir", - ["elmls"] = "elm", - ["eslint"] = "vscode-eslint", - ["gopls"] = "go", - ["hls"] = "haskell", - ["intelephense"] = "php", - ["kotlin_language_server"] = "kotlin", - ["phpactor"] = "phpactor-source", - ["purescriptls"] = "purescript", - ["pyright"] = "python", - ["rust_analyzer"] = "rust", - ["tailwindcss"] = "tailwindcss_npm", - ["terraformls"] = "terraform", - ["texlab"] = "latex", - ["vimls"] = "vim", - ["yamlls"] = "yaml", -} - -local CORE_SERVERS = _.set_of { - "angularls", - "ansiblels", - "apex_ls", - "arduino_language_server", - "asm_lsp", - "astro", - "awk_ls", - "bashls", - "beancount", - "bicep", - "bsl_ls", - "ccls", - "clangd", - "clarity_lsp", - "clojure_lsp", - "cmake", - "codeqlls", - "crystalline", - "csharp_ls", - "cssls", - "cssmodules_ls", - "cucumber_language_server", - "dartls", - "denols", - "dhall_lsp_server", - "diagnosticls", - "dockerls", - "dotls", - "efm", - "elixirls", - "elmls", - "ember", - "emmet_ls", - "erlangls", - "esbonio", - "eslint", - "flux_lsp", - "foam_ls", - "fortls", - "fsautocomplete", - "golangci_lint_ls", - "gopls", - "grammarly", - "graphql", - "groovyls", - "haxe_language_server", - "hls", - "hoon_ls", - "html", - "intelephense", - "jdtls", - "jedi_language_server", - "jsonls", - "jsonnet_ls", - "julials", - "kotlin_language_server", - "lelwel_ls", - "lemminx", - "ltex", - "marksman", - "mm0_ls", - "nickel_ls", - "nimls", - "ocamlls", - "ocamllsp", - "omnisharp", - "opencl_ls", - "perlnavigator", - "phpactor", - "powershell_es", - "prismals", - "prosemd_lsp", - "psalm", - "puppet", - "purescriptls", - "pylsp", - "pyright", - "quick_lint_js", - "r_language_server", - "reason_ls", - "remark_ls", - "rescriptls", - "rnix", - "robotframework_ls", - "rome", - "rust_analyzer", - "salt_ls", - "scry", - "serve_d", - "slint_lsp", - "solang", - "solargraph", - "solc", - "solidity_ls", - "sorbet", - "sourcekit", - "sourcery", - "sqlls", - "sqls", - "stylelint_lsp", - "sumneko_lua", - "svelte", - "svlangserver", - "svls", - "tailwindcss", - "taplo", - "teal_ls", - "terraformls", - "texlab", - "tflint", - "theme_check", - "tsserver", - "vala_ls", - "verible", - "vimls", - "visualforce_ls", - "vls", - "volar", - "vuels", - "wgsl_analyzer", - "yamlls", - "zk", - "zls", -} - ----@type table<string, Server> -local INITIALIZED_SERVERS = {} - -local cached_server_roots - -local function scan_server_roots() - if cached_server_roots then - return cached_server_roots - end - log.trace "Scanning server roots" - ---@type string[] - local result = {} - local ok, entries = pcall(fs.sync.readdir, settings.current.install_root_dir) - if not ok then - log.debug("Failed to scan server roots", entries) - -- presume servers root dir has not been created yet (i.e., no servers installed) - return {} - end - for i = 1, #entries do - local entry = entries[i] - if entry.type == "directory" then - result[#result + 1] = entry.name - end - end - cached_server_roots = _.set_of(result) - vim.schedule(function() - cached_server_roots = nil - end) - log.trace("Resolved server roots", cached_server_roots) - return cached_server_roots -end - ----@param server_name string ----@return string -local function get_server_install_dir(server_name) - log.fmt_trace("Getting server installation dirname. uses_new_setup=%s", settings.uses_new_setup) - if settings.uses_new_setup then - return server_name - else - return INSTALL_DIRS[server_name] or server_name - end -end - -function M.get_server_install_path(dirname) - log.trace("Getting server installation path", settings.current.install_root_dir, dirname) - return path.concat { settings.current.install_root_dir, dirname } -end - ----@param server_name string -function M.is_server_installed(server_name) - log.trace("Checking if server is installed", server_name) - local scanned_server_dirs = scan_server_roots() - local dirname = get_server_install_dir(server_name) - return scanned_server_dirs[dirname] or false -end - ----@param server_identifier string @The server identifier to parse. ----@return string, string|nil @Returns a (server_name, requested_version) tuple, where requested_version may be nil. -function M.parse_server_identifier(server_identifier) - return unpack(vim.split(server_identifier, "@")) -end - ----@param server_name string ----@return boolean, Server -function M.get_server(server_name) - if INITIALIZED_SERVERS[server_name] then - return true, INITIALIZED_SERVERS[server_name] - end - - if not CORE_SERVERS[server_name] then - return false, ("Server %s does not exist."):format(server_name) - end - - local ok, server_factory = pcall(require, ("nvim-lsp-installer.servers.%s"):format(server_name)) - if ok then - log.trace("Initializing core server", server_name) - INITIALIZED_SERVERS[server_name] = server_factory( - server_name, - M.get_server_install_path(get_server_install_dir(server_name)) - ) - return true, INITIALIZED_SERVERS[server_name] - end - return false, - ( - "Unable to import server %s.\n\nThis is an unexpected error, please file an issue at %s with the following information:\n%s" - ):format(server_name, "https://github.com/williamboman/nvim-lsp-installer", server_factory) -end - ----@type fun(server_names: string): Server[] -local resolve_servers = _.map(function(server_name) - local ok, server = M.get_server(server_name) - if not ok then - error(server) - end - return server -end) - ----@return string[] -function M.get_available_server_names() - return vim.tbl_keys(vim.tbl_extend("force", CORE_SERVERS, INITIALIZED_SERVERS)) -end - ----@return string[] -function M.get_installed_server_names() - return vim.tbl_filter(function(server_name) - return M.is_server_installed(server_name) - end, M.get_available_server_names()) -end - ----@return string[] -function M.get_uninstalled_server_names() - return vim.tbl_filter(function(server_name) - return not M.is_server_installed(server_name) - end, M.get_available_server_names()) -end - --- Expensive to call the first time - loads all server modules. -function M.get_available_servers() - return resolve_servers(M.get_available_server_names()) -end - --- Somewhat expensive to call the first time (depends on how many servers are currently installed). -function M.get_installed_servers() - return resolve_servers(M.get_installed_server_names()) -end - --- Expensive to call the first time (depends on how many servers are currently not installed). -function M.get_uninstalled_servers() - return resolve_servers(M.get_uninstalled_server_names()) -end - ----@param server Server @The server to register. -function M.register(server) - INSTALL_DIRS[server.name] = vim.fn.fnamemodify(server.root_dir, ":t") - INITIALIZED_SERVERS[server.name] = server -end - -return M diff --git a/lua/nvim-lsp-installer/servers/intelephense/init.lua b/lua/nvim-lsp-installer/servers/intelephense/init.lua deleted file mode 100644 index 6fbf1c9c..00000000 --- a/lua/nvim-lsp-installer/servers/intelephense/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local npm = require "nvim-lsp-installer.core.managers.npm" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://intelephense.com", - languages = { "php" }, - installer = npm.packages { "intelephense" }, - default_options = { - cmd_env = npm.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/jdtls/init.lua b/lua/nvim-lsp-installer/servers/jdtls/init.lua deleted file mode 100644 index 64af9b78..00000000 --- a/lua/nvim-lsp-installer/servers/jdtls/init.lua +++ /dev/null @@ -1,97 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local path = require "nvim-lsp-installer.core.path" -local platform = require "nvim-lsp-installer.core.platform" -local functional = require "nvim-lsp-installer.core.functional" -local installer = require "nvim-lsp-installer.core.installer" -local eclipse = require "nvim-lsp-installer.core.clients.eclipse" -local std = require "nvim-lsp-installer.core.managers.std" - -return function(name, root_dir) - ---@param workspace_root string - ---@param workspace_path string|nil @The path to the server instance's current workspace. Can be nil when running in single file mode. - local function get_cmd(workspace_root, workspace_path) - local executable = vim.env.JAVA_HOME and path.concat { vim.env.JAVA_HOME, "bin", "java" } or "java" - local jar = vim.fn.expand(path.concat { root_dir, "plugins", "org.eclipse.equinox.launcher_*.jar" }) - local lombok = vim.fn.expand(path.concat { root_dir, "lombok.jar" }) - local workspace_dir = vim.fn.fnamemodify(workspace_path or vim.fn.getcwd(), ":p:h:t") - - return { - platform.is_win and ("%s.exe"):format(executable) or executable, - "-Declipse.application=org.eclipse.jdt.ls.core.id1", - "-Dosgi.bundles.defaultStartLevel=4", - "-Declipse.product=org.eclipse.jdt.ls.core.product", - "-Dlog.protocol=true", - "-Dlog.level=ALL", - "-Xms1g", - "-Xmx2G", - "-javaagent:" .. lombok, - "--add-modules=ALL-SYSTEM", - "--add-opens", - "java.base/java.util=ALL-UNNAMED", - "--add-opens", - "java.base/java.lang=ALL-UNNAMED", - "-jar", - jar, - "-configuration", - path.concat { - root_dir, - functional.coalesce( - functional.when(platform.is_mac, "config_mac"), - functional.when(platform.is_linux, "config_linux"), - functional.when(platform.is_win, "config_win") - ), - }, - "-data", - path.concat { workspace_root, workspace_dir }, - } - end - - local function download_jdtls() - local ctx = installer.context() - local version = ctx.requested_version:or_else_get(function() - return eclipse.fetch_latest_jdtls_version():get_or_throw() - end) - - std.download_file( - ("https://download.eclipse.org/jdtls/snapshots/jdt-language-server-%s.tar.gz"):format(version), - "archive.tar.gz" - ) - std.untar "archive.tar.gz" - - ctx.receipt:with_primary_source { - type = "jdtls", - version = version, - } - end - - local function download_lombok() - std.download_file("https://projectlombok.org/downloads/lombok.jar", "lombok.jar") - end - - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "java" }, - homepage = "https://github.com/eclipse/eclipse.jdt.ls", - ---@param ctx InstallContext - installer = function(ctx) - std.ensure_executable "java" - ctx:run_concurrently { download_jdtls, download_lombok } - end, - default_options = { - cmd = get_cmd( - vim.env.WORKSPACE and vim.env.WORKSPACE or path.concat { vim.env.HOME, "workspace" }, - vim.loop.cwd() - ), - on_new_config = function(config, workspace_path) - -- We redefine the cmd in on_new_config because `cmd` will be invalid if the user has not installed - -- jdtls when starting the session (due to vim.fn.expand returning an empty string, because it can't - -- locate the file). - config.cmd = get_cmd( - vim.env.WORKSPACE and vim.env.WORKSPACE or path.concat { vim.env.HOME, "workspace" }, - workspace_path - ) - end, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/jedi_language_server/init.lua b/lua/nvim-lsp-installer/servers/jedi_language_server/init.lua deleted file mode 100644 index b21ed897..00000000 --- a/lua/nvim-lsp-installer/servers/jedi_language_server/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local pip3 = require "nvim-lsp-installer.core.managers.pip3" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "python" }, - homepage = "https://github.com/pappasam/jedi-language-server", - installer = pip3.packages { "jedi-language-server" }, - default_options = { - cmd_env = pip3.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/jsonls/init.lua b/lua/nvim-lsp-installer/servers/jsonls/init.lua deleted file mode 100644 index 6f7d6059..00000000 --- a/lua/nvim-lsp-installer/servers/jsonls/init.lua +++ /dev/null @@ -1 +0,0 @@ -return require "nvim-lsp-installer.servers.vscode-langservers-extracted" { "json" } diff --git a/lua/nvim-lsp-installer/servers/jsonnet_ls/init.lua b/lua/nvim-lsp-installer/servers/jsonnet_ls/init.lua deleted file mode 100644 index a94c534f..00000000 --- a/lua/nvim-lsp-installer/servers/jsonnet_ls/init.lua +++ /dev/null @@ -1,16 +0,0 @@ -local path = require "nvim-lsp-installer.core.path" -local server = require "nvim-lsp-installer.server" -local go = require "nvim-lsp-installer.core.managers.go" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://github.com/grafana/jsonnet-language-server", - installer = go.packages { "github.com/grafana/jsonnet-language-server" }, - default_options = { - -- TODO: use env instead of cmd once https://github.com/neovim/nvim-lspconfig/pull/1559 is merged - cmd = { path.concat { root_dir, "jsonnet-language-server" } }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/julials/README.md b/lua/nvim-lsp-installer/servers/julials/README.md deleted file mode 100644 index 18e6880d..00000000 --- a/lua/nvim-lsp-installer/servers/julials/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# julials - -## Configuring the Julia Environment - -The Julia Environment will be identified in the following order: - -1) user configuration (`lspconfig.julials.setup { julia_env_path = "/my/env" }`) -2) if the `Project.toml` & `Manifest.toml` (or `JuliaProject.toml` & `JuliaManifest.toml`) files exists in the current project working directory, the current project working directory is used as the environment -3) the result of `Pkg.Types.Context().env.project_file` diff --git a/lua/nvim-lsp-installer/servers/julials/init.lua b/lua/nvim-lsp-installer/servers/julials/init.lua deleted file mode 100644 index 85f59303..00000000 --- a/lua/nvim-lsp-installer/servers/julials/init.lua +++ /dev/null @@ -1,102 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local path = require "nvim-lsp-installer.core.path" -local std = require "nvim-lsp-installer.core.managers.std" -local github = require "nvim-lsp-installer.core.managers.github" -local platform = require "nvim-lsp-installer.core.platform" -local fs = require "nvim-lsp-installer.core.fs" -local _ = require "nvim-lsp-installer.core.functional" - -return function(name, root_dir) - local server_script = [[ -using LanguageServer, SymbolServer, Pkg - -OLD_DEPOT_PATH = ARGS[1] -SYMBOLSTORE_PATH = ARGS[2] -ENV_PATH = ARGS[3] - -runserver( - stdin, - stdout, - ENV_PATH, - OLD_DEPOT_PATH, - nothing, - SYMBOLSTORE_PATH -) -]] - - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://github.com/julia-vscode/LanguageServer.jl", - languages = { "julia" }, - ---@param ctx InstallContext - installer = function(ctx) - std.ensure_executable("julia", { help_url = "https://julialang.org/downloads/" }) - - ctx.fs:mkdir "vscode-package" - ctx:chdir("vscode-package", function() - github.unzip_release_file({ - repo = "julia-vscode/julia-vscode", - asset_file = function(version) - local version_number = version:gsub("^v", "") - return ("language-julia-%s.vsix"):format(version_number) - end, - }).with_receipt() - end) - - ctx.fs:rename( - path.concat { - "vscode-package", - "extension", - "scripts", - }, - "scripts" - ) - ctx.fs:rmrf "vscode-package" - - ctx.fs:write_file("nvim-lsp.jl", server_script) - end, - default_options = { - on_new_config = function(config, new_root_dir) - local env_path = config.julia_env_path and vim.fn.expand(config.julia_env_path) - if not env_path then - local file_exists = _.compose(fs.sync.file_exists, path.concat, _.concat { new_root_dir }) - if file_exists { "Project.toml" } and file_exists { "Manifest.toml" } then - env_path = new_root_dir - elseif file_exists { "JuliaProject.toml" } and file_exists { "JuliaManifest.toml" } then - env_path = new_root_dir - end - end - - if not env_path then - local ok, env = pcall(vim.fn.system, { - "julia", - "--startup-file=no", - "--history-file=no", - "-e", - "using Pkg; print(dirname(Pkg.Types.Context().env.project_file))", - }) - if ok then - env_path = env - end - end - - config.cmd = { - "julia", - "--startup-file=no", - "--history-file=no", - "--depwarn=no", - ("--project=%s"):format(path.concat { root_dir, "scripts", "environments", "languageserver" }), - path.concat { root_dir, "nvim-lsp.jl" }, - vim.env.JULIA_DEPOT_PATH or "", - path.concat { root_dir, "symbolstorev5" }, - env_path, - } - end, - cmd_env = { - JULIA_DEPOT_PATH = path.concat { root_dir, "lsdepot" }, - JULIA_LOAD_PATH = platform.is.win and ";" or ":", - }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/kotlin_language_server/init.lua b/lua/nvim-lsp-installer/servers/kotlin_language_server/init.lua deleted file mode 100644 index 43851b9a..00000000 --- a/lua/nvim-lsp-installer/servers/kotlin_language_server/init.lua +++ /dev/null @@ -1,30 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local process = require "nvim-lsp-installer.core.process" -local path = require "nvim-lsp-installer.core.path" -local github = require "nvim-lsp-installer.core.managers.github" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://github.com/fwcd/kotlin-language-server", - languages = { "kotlin" }, - installer = function() - github.unzip_release_file({ - repo = "fwcd/kotlin-language-server", - asset_file = "server.zip", - }).with_receipt() - end, - default_options = { - cmd_env = { - PATH = process.extend_path { - path.concat { - root_dir, - "server", - "bin", - }, - }, - }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/lelwel_ls/init.lua b/lua/nvim-lsp-installer/servers/lelwel_ls/init.lua deleted file mode 100644 index 2aefd068..00000000 --- a/lua/nvim-lsp-installer/servers/lelwel_ls/init.lua +++ /dev/null @@ -1,17 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local cargo = require "nvim-lsp-installer.core.managers.cargo" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "lelwel" }, - homepage = "https://github.com/0x2a-42/lelwel", - installer = cargo.crate("lelwel", { - features = "lsp", - }), - default_options = { - cmd_env = cargo.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/lemminx/init.lua b/lua/nvim-lsp-installer/servers/lemminx/init.lua deleted file mode 100644 index 786c399e..00000000 --- a/lua/nvim-lsp-installer/servers/lemminx/init.lua +++ /dev/null @@ -1,46 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local functional = require "nvim-lsp-installer.core.functional" -local platform = require "nvim-lsp-installer.core.platform" -local process = require "nvim-lsp-installer.core.process" -local std = require "nvim-lsp-installer.core.managers.std" - -local coalesce, when = functional.coalesce, functional.when - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "xml" }, - homepage = "https://github.com/eclipse/lemminx", - ---@param ctx InstallContext - installer = function(ctx) - local unzipped_file = assert( - coalesce( - when(platform.is_mac, "lemminx-osx-x86_64"), - when(platform.is_linux, "lemminx-linux"), - when(platform.is_win, "lemminx-win32") - ), - ("Your operating system or architecture (%q) is not yet supported."):format(platform.arch) - ) - - std.download_file( - ("https://download.jboss.org/jbosstools/vscode/snapshots/lemminx-binary/%s/%s.zip"):format( - ctx.requested_version:or_else "0.19.2-655", -- TODO: resolve latest version dynamically - unzipped_file - ), - "lemminx.zip" - ) - std.unzip("lemminx.zip", ".") - ctx.fs:rename( - platform.is_win and ("%s.exe"):format(unzipped_file) or unzipped_file, - platform.is_win and "lemminx.exe" or "lemminx" - ) - ctx.receipt:with_primary_source(ctx.receipt.unmanaged) - end, - default_options = { - cmd_env = { - PATH = process.extend_path { root_dir }, - }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/ltex/init.lua b/lua/nvim-lsp-installer/servers/ltex/init.lua deleted file mode 100644 index d1380eb9..00000000 --- a/lua/nvim-lsp-installer/servers/ltex/init.lua +++ /dev/null @@ -1,77 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local a = require "nvim-lsp-installer.core.async" -local _ = require "nvim-lsp-installer.core.functional" -local installer = require "nvim-lsp-installer.core.installer" -local path = require "nvim-lsp-installer.core.path" -local functional = require "nvim-lsp-installer.core.functional" -local platform = require "nvim-lsp-installer.core.platform" -local process = require "nvim-lsp-installer.core.process" -local github = require "nvim-lsp-installer.core.managers.github" - -local coalesce, when = functional.coalesce, functional.when - -return function(name, root_dir) - local repo = "valentjn/ltex-ls" - ---@async - local function download_platform_dependent() - local ctx = installer.context() - local source = platform.when { - unix = function() - return github.untargz_release_file { - repo = repo, - asset_file = function(version) - local target = coalesce( - when(platform.is_mac, "ltex-ls-%s-mac-x64.tar.gz"), - when(platform.is_linux, "ltex-ls-%s-linux-x64.tar.gz"), - when(platform.is_win, "ltex-ls-%s-windows-x64.zip") - ) - return target:format(version) - end, - } - end, - win = function() - return github.unzip_release_file { - repo = repo, - asset_file = function(version) - return ("ltex-ls-%s-windows-x64.zip"):format(version) - end, - } - end, - } - source.with_receipt() - ctx.fs:rename(("ltex-ls-%s"):format(source.release), "ltex-ls") - end - - local function download_platform_independent() - local ctx = installer.context() - local source = github.untargz_release_file { - repo = repo, - asset_file = _.format "ltex-ls-%s.tar.gz", - } - source.with_receipt() - ctx.fs:rename(("ltex-ls-%s"):format(source.release), "ltex-ls") - end - - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://valentjn.github.io/vscode-ltex", - languages = { "latex" }, - ---@async - installer = function() - if vim.in_fast_event() then - a.scheduler() - end - if vim.fn.executable "java" == 1 then - download_platform_independent() - else - download_platform_dependent() - end - end, - default_options = { - cmd_env = { - PATH = process.extend_path { path.concat { root_dir, "ltex-ls", "bin" } }, - }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/marksman/init.lua b/lua/nvim-lsp-installer/servers/marksman/init.lua deleted file mode 100644 index 00ef26cc..00000000 --- a/lua/nvim-lsp-installer/servers/marksman/init.lua +++ /dev/null @@ -1,34 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local process = require "nvim-lsp-installer.core.process" -local platform = require "nvim-lsp-installer.core.platform" -local functional = require "nvim-lsp-installer.core.functional" -local github = require "nvim-lsp-installer.core.managers.github" -local std = require "nvim-lsp-installer.core.managers.std" - -local coalesce, when = functional.coalesce, functional.when - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://github.com/artempyanykh/marksman", - languages = { "markdown" }, - installer = function() - github.download_release_file({ - repo = "artempyanykh/marksman", - out_file = platform.is_win and "marksman.exe" or "marksman", - asset_file = coalesce( - when(platform.is.mac, "marksman-macos"), - when(platform.is.linux_x64, "marksman-linux"), - when(platform.is_win_x64, "marksman.exe") - ), - }).with_receipt() - std.chmod("+x", { "marksman" }) - end, - default_options = { - cmd_env = { - PATH = process.extend_path { root_dir }, - }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/mm0_ls/init.lua b/lua/nvim-lsp-installer/servers/mm0_ls/init.lua deleted file mode 100644 index 6190953b..00000000 --- a/lua/nvim-lsp-installer/servers/mm0_ls/init.lua +++ /dev/null @@ -1,25 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local path = require "nvim-lsp-installer.core.path" -local process = require "nvim-lsp-installer.core.process" -local git = require "nvim-lsp-installer.core.managers.git" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "metamath-zero" }, - homepage = "https://github.com/digama0/mm0", - ---@param ctx InstallContext - installer = function(ctx) - git.clone({ "https://github.com/digama0/mm0" }).with_receipt() - ctx:chdir("mm0-rs", function() - ctx.spawn.cargo { "build", "--release" } - end) - end, - default_options = { - cmd_env = { - PATH = process.extend_path { path.concat { root_dir, "mm0-rs", "target", "release" } }, - }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/nickel_ls/init.lua b/lua/nvim-lsp-installer/servers/nickel_ls/init.lua deleted file mode 100644 index c180639d..00000000 --- a/lua/nvim-lsp-installer/servers/nickel_ls/init.lua +++ /dev/null @@ -1,26 +0,0 @@ -local path = require "nvim-lsp-installer.core.path" -local server = require "nvim-lsp-installer.server" -local cargo = require "nvim-lsp-installer.core.managers.cargo" -local git = require "nvim-lsp-installer.core.managers.git" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://nickel-lang.org/", - languages = { "nickel" }, - installer = function(ctx) - git.clone({ "https://github.com/tweag/nickel" }).with_receipt() - ctx.spawn.cargo { - "install", - "--root", - ".", - "--path", - path.concat { "lsp", "nls" }, - } - end, - default_options = { - cmd_env = cargo.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/nimls/init.lua b/lua/nvim-lsp-installer/servers/nimls/init.lua deleted file mode 100644 index fc38e116..00000000 --- a/lua/nvim-lsp-installer/servers/nimls/init.lua +++ /dev/null @@ -1,22 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local process = require "nvim-lsp-installer.core.process" -local git = require "nvim-lsp-installer.core.managers.git" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://github.com/PMunch/nimlsp", - languages = { "nim" }, - ---@param ctx InstallContext - installer = function(ctx) - git.clone({ "https://github.com/PMunch/nimlsp.git" }).with_receipt() - ctx.spawn.nimble { "build", "-y", "--localdeps" } - end, - default_options = { - cmd_env = { - PATH = process.extend_path { root_dir }, - }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/ocamlls/init.lua b/lua/nvim-lsp-installer/servers/ocamlls/init.lua deleted file mode 100644 index 2d98e6ca..00000000 --- a/lua/nvim-lsp-installer/servers/ocamlls/init.lua +++ /dev/null @@ -1,19 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local npm = require "nvim-lsp-installer.core.managers.npm" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - deprecated = { - message = "ocamlls is deprecated, use ocamllsp instead.", - replace_with = "ocamllsp", - }, - homepage = "https://github.com/ocaml-lsp/ocaml-language-server", - languages = { "ocaml" }, - installer = npm.packages { "ocaml-language-server" }, - default_options = { - cmd_env = npm.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/ocamllsp/init.lua b/lua/nvim-lsp-installer/servers/ocamllsp/init.lua deleted file mode 100644 index 0be2ce00..00000000 --- a/lua/nvim-lsp-installer/servers/ocamllsp/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local opam = require "nvim-lsp-installer.core.managers.opam" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://github.com/ocaml/ocaml-lsp", - languages = { "ocaml" }, - installer = opam.packages { "ocaml-lsp-server" }, - default_options = { - cmd_env = opam.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/omnisharp/README.md b/lua/nvim-lsp-installer/servers/omnisharp/README.md deleted file mode 100644 index 3aec548b..00000000 --- a/lua/nvim-lsp-installer/servers/omnisharp/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# omnisharp - -## How to enable Omnisharp Mono - -By default, the `omnisharp` server will use the `dotnet` (NET6) runtime to run the server. -To run the server using the Mono runtime, set the `use_mono` setting like so: - -```lua -local lspconfig = require("lspconfig") - -lspconfig.omnisharp.setup { - use_mono = true -} -``` diff --git a/lua/nvim-lsp-installer/servers/omnisharp/init.lua b/lua/nvim-lsp-installer/servers/omnisharp/init.lua deleted file mode 100644 index 36aac24c..00000000 --- a/lua/nvim-lsp-installer/servers/omnisharp/init.lua +++ /dev/null @@ -1,76 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local platform = require "nvim-lsp-installer.core.platform" -local path = require "nvim-lsp-installer.core.path" -local functional = require "nvim-lsp-installer.core.functional" -local github = require "nvim-lsp-installer.core.managers.github" -local std = require "nvim-lsp-installer.core.managers.std" -local Result = require "nvim-lsp-installer.core.result" - -local coalesce, when = functional.coalesce, functional.when - ----@param install_dir string ----@param use_mono boolean -local generate_cmd = function(install_dir, use_mono) - if use_mono then - return { - "mono", - path.concat { install_dir, "omnisharp-mono", "OmniSharp.exe" }, - "--languageserver", - "--hostPID", - tostring(vim.fn.getpid()), - } - else - return { - "dotnet", - path.concat { install_dir, "omnisharp", "OmniSharp.dll" }, - "--languageserver", - "--hostPID", - tostring(vim.fn.getpid()), - } - end -end - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://github.com/OmniSharp/omnisharp-roslyn", - languages = { "c#" }, - ---@param ctx InstallContext - installer = function(ctx) - Result.run_catching(function() - std.ensure_executable("mono", { help_url = "https://www.mono-project.com/download/stable/" }) - end):recover(function() - std.ensure_executable("dotnet", { help_url = "https://dotnet.microsoft.com/download" }) - end) - - ctx.fs:mkdir "omnisharp" - ctx:chdir("omnisharp", function() - github.unzip_release_file { - repo = "OmniSharp/omnisharp-roslyn", - asset_file = coalesce( - when(platform.is.mac_x64, "omnisharp-osx-x64-net6.0.zip"), - when(platform.is.mac_arm64, "omnisharp-osx-arm64-net6.0.zip"), - when(platform.is.linux_x64, "omnisharp-linux-x64-net6.0.zip"), - when(platform.is.linux_arm64, "omnisharp-linux-arm64-net6.0.zip"), - when(platform.is.win_x64, "omnisharp-win-x64-net6.0.zip"), - when(platform.is.win_arm64, "omnisharp-win-arm64-net6.0.zip") - ), - } - end) - - ctx.fs:mkdir "omnisharp-mono" - ctx:chdir("omnisharp-mono", function() - github.unzip_release_file({ - repo = "OmniSharp/omnisharp-roslyn", - asset_file = "omnisharp-mono.zip", - }).with_receipt() - end) - end, - default_options = { - on_new_config = function(config) - config.cmd = generate_cmd(root_dir, config.use_mono) - end, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/opencl_ls/init.lua b/lua/nvim-lsp-installer/servers/opencl_ls/init.lua deleted file mode 100644 index 92c9fa1d..00000000 --- a/lua/nvim-lsp-installer/servers/opencl_ls/init.lua +++ /dev/null @@ -1,41 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local process = require "nvim-lsp-installer.core.process" -local platform = require "nvim-lsp-installer.core.platform" -local functional = require "nvim-lsp-installer.core.functional" -local github = require "nvim-lsp-installer.core.managers.github" - -local coalesce, when = functional.coalesce, functional.when - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://github.com/Galarius/opencl-language-server", - languages = { "opencl" }, - installer = function() - platform.when { - unix = function() - local asset_file = coalesce( - when(platform.is_mac, "opencl-language-server-darwin-x86_64.tar.gz"), - when(platform.is_linux and platform.arch == "x64", "opencl-language-server-linux-x86_64.tar.gz") - ) - github.untargz_release_file({ - repo = "Galarius/opencl-language-server", - asset_file = asset_file, - }).with_receipt() - end, - win = function() - github.unzip_release_file({ - repo = "Galarius/opencl-language-server", - asset_file = "opencl-language-server-win32-x86_64.zip", - }).with_receipt() - end, - } - end, - default_options = { - cmd_env = { - PATH = process.extend_path { root_dir }, - }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/perlnavigator/init.lua b/lua/nvim-lsp-installer/servers/perlnavigator/init.lua deleted file mode 100644 index 56ca88cc..00000000 --- a/lua/nvim-lsp-installer/servers/perlnavigator/init.lua +++ /dev/null @@ -1,20 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local path = require "nvim-lsp-installer.core.path" -local npm = require "nvim-lsp-installer.core.managers.npm" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "perl" }, - homepage = "https://github.com/bscan/PerlNavigator", - installer = npm.packages { "perlnavigator-server" }, - default_options = { - cmd = { - "node", - path.concat { root_dir, "node_modules", "perlnavigator-server", "out", "server.js" }, - "--stdio", - }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/phpactor/init.lua b/lua/nvim-lsp-installer/servers/phpactor/init.lua deleted file mode 100644 index 6c151353..00000000 --- a/lua/nvim-lsp-installer/servers/phpactor/init.lua +++ /dev/null @@ -1,25 +0,0 @@ -local path = require "nvim-lsp-installer.core.path" -local server = require "nvim-lsp-installer.server" -local composer = require "nvim-lsp-installer.core.managers.composer" -local git = require "nvim-lsp-installer.core.managers.git" -local process = require "nvim-lsp-installer.core.process" -local platform = require "nvim-lsp-installer.core.platform" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://phpactor.readthedocs.io/en/master/", - languages = { "php" }, - installer = function() - assert(platform.is_unix, "Phpactor only supports UNIX environments.") - git.clone({ "https://github.com/phpactor/phpactor.git" }).with_receipt() - composer.install() - end, - default_options = { - cmd_env = { - PATH = process.extend_path { path.concat { root_dir, "bin" } }, - }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/powershell_es/init.lua b/lua/nvim-lsp-installer/servers/powershell_es/init.lua deleted file mode 100644 index 0aa64ea3..00000000 --- a/lua/nvim-lsp-installer/servers/powershell_es/init.lua +++ /dev/null @@ -1,23 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local path = require "nvim-lsp-installer.core.path" -local std = require "nvim-lsp-installer.core.managers.std" -local github = require "nvim-lsp-installer.core.managers.github" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://github.com/PowerShell/PowerShellEditorServices", - languages = { "powershell" }, - installer = function() - std.ensure_executable("pwsh", { help_url = "https://github.com/PowerShell/PowerShell#get-powershell" }) - github.unzip_release_file({ - repo = "PowerShell/PowerShellEditorServices", - asset_file = "PowerShellEditorServices.zip", - }).with_receipt() - end, - default_options = { - bundle_path = path.concat { root_dir }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/prismals/init.lua b/lua/nvim-lsp-installer/servers/prismals/init.lua deleted file mode 100644 index a32c88a9..00000000 --- a/lua/nvim-lsp-installer/servers/prismals/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local npm = require "nvim-lsp-installer.core.managers.npm" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "prisma" }, - homepage = "https://github.com/prisma/language-tools", - installer = npm.packages { "@prisma/language-server" }, - default_options = { - cmd_env = npm.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/prosemd_lsp/init.lua b/lua/nvim-lsp-installer/servers/prosemd_lsp/init.lua deleted file mode 100644 index b89e0d3e..00000000 --- a/lua/nvim-lsp-installer/servers/prosemd_lsp/init.lua +++ /dev/null @@ -1,34 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local process = require "nvim-lsp-installer.core.process" -local platform = require "nvim-lsp-installer.core.platform" -local functional = require "nvim-lsp-installer.core.functional" -local github = require "nvim-lsp-installer.core.managers.github" -local std = require "nvim-lsp-installer.core.managers.std" - -local coalesce, when = functional.coalesce, functional.when - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://github.com/kitten/prosemd-lsp", - languages = { "markdown" }, - installer = function() - github.download_release_file({ - repo = "kitten/prosemd-lsp", - out_file = platform.is_win and "prosemd-lsp.exe" or "prosemd-lsp", - asset_file = coalesce( - when(platform.is_mac, "prosemd-lsp-macos"), - when(platform.is_linux and platform.arch == "x64", "prosemd-lsp-linux"), - when(platform.is_win and platform.arch == "x64", "prosemd-lsp-windows.exe") - ), - }).with_receipt() - std.chmod("+x", { "prosemd-lsp" }) - end, - default_options = { - cmd_env = { - PATH = process.extend_path { root_dir }, - }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/psalm/init.lua b/lua/nvim-lsp-installer/servers/psalm/init.lua deleted file mode 100644 index 29f9754a..00000000 --- a/lua/nvim-lsp-installer/servers/psalm/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local composer = require "nvim-lsp-installer.core.managers.composer" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://psalm.dev/", - languages = { "php" }, - installer = composer.packages { "vimeo/psalm" }, - default_options = { - cmd_env = composer.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/puppet/init.lua b/lua/nvim-lsp-installer/servers/puppet/init.lua deleted file mode 100644 index 2631dcd3..00000000 --- a/lua/nvim-lsp-installer/servers/puppet/init.lua +++ /dev/null @@ -1,25 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local process = require "nvim-lsp-installer.core.process" -local github = require "nvim-lsp-installer.core.managers.github" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://github.com/puppetlabs/puppet-editor-services", - languages = { "puppet" }, - installer = function() - github.unzip_release_file({ - repo = "puppetlabs/puppet-editor-services", - asset_file = function(version) - return ("puppet_editor_services_%s.zip"):format(version) - end, - }).with_receipt() - end, - default_options = { - cmd_env = { - PATH = process.extend_path { root_dir }, - }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/purescriptls/init.lua b/lua/nvim-lsp-installer/servers/purescriptls/init.lua deleted file mode 100644 index cb1d4add..00000000 --- a/lua/nvim-lsp-installer/servers/purescriptls/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local npm = require "nvim-lsp-installer.core.managers.npm" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "purescript" }, - homepage = "https://github.com/nwolverson/purescript-language-server", - installer = npm.packages { "purescript-language-server" }, - default_options = { - cmd_env = npm.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/pylsp/README.md b/lua/nvim-lsp-installer/servers/pylsp/README.md deleted file mode 100644 index 2434bb4b..00000000 --- a/lua/nvim-lsp-installer/servers/pylsp/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Pylsp - -## Installing pylsp plugins - -Pylsp has [third party plugins](https://github.com/python-lsp/python-lsp-server#3rd-party-plugins) which are not installed by default. - -In order for these plugins to work with the `pylsp` server managed by this plugin, they need to be installed in the same [virtual environment](https://docs.python.org/3/library/venv.html) as `pylsp`. For these reasons, there's a convenient `:PylspInstall <packages>` command that does this for you, for example: - -```vim -:PylspInstall pyls-flake8 pylsp-mypy pyls-isort -``` - -The `:PylspInstall` command will only be available once the `pylsp` server has been set up. - -**Note that these extra pylsp plugins will not be reinstalled if you update/reinstall the `pylsp` server, you will have to manage -them manually.** diff --git a/lua/nvim-lsp-installer/servers/pylsp/init.lua b/lua/nvim-lsp-installer/servers/pylsp/init.lua deleted file mode 100644 index 4f0a01d1..00000000 --- a/lua/nvim-lsp-installer/servers/pylsp/init.lua +++ /dev/null @@ -1,63 +0,0 @@ -local a = require "nvim-lsp-installer.core.async" -local _ = require "nvim-lsp-installer.core.functional" -local server = require "nvim-lsp-installer.server" -local pip3 = require "nvim-lsp-installer.core.managers.pip3" -local process = require "nvim-lsp-installer.core.process" -local notify = require "nvim-lsp-installer.notify" -local middleware = require "nvim-lsp-installer.middleware" -local spawn = require "nvim-lsp-installer.core.spawn" - -return function(name, root_dir) - middleware.register_server_hook(name, function() - vim.api.nvim_create_user_command( - "PylspInstall", - a.scope(function(opts) - local plugins = opts.fargs - local plugins_str = table.concat(plugins, ", ") - notify(("Installing %s..."):format(plugins_str)) - local result = spawn.pip { - "install", - "-U", - "--disable-pip-version-check", - plugins, - stdio_sink = process.simple_sink(), - with_paths = { pip3.venv_path(root_dir) }, - } - if vim.in_fast_event() then - a.scheduler() - end - result - :on_success(function() - notify(("Successfully installed pylsp plugins %s"):format(plugins_str)) - end) - :on_failure(function() - notify("Failed to install requested pylsp plugins.", vim.log.levels.ERROR) - end) - end), - { - desc = "[nvim-lsp-installer] Installs the provided packages in the same venv as pylsp.", - nargs = "+", - complete = _.always { - "pyls-flake8", - "pylsp-mypy", - "pyls-spyder", - "pyls-isort", - "python-lsp-black", - "pyls-memestra", - "pylsp-rope", - }, - } - ) - end) - - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "python" }, - homepage = "https://github.com/python-lsp/python-lsp-server", - installer = pip3.packages { "python-lsp-server[all]" }, - default_options = { - cmd_env = pip3.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/pyright/init.lua b/lua/nvim-lsp-installer/servers/pyright/init.lua deleted file mode 100644 index 92b8dfc0..00000000 --- a/lua/nvim-lsp-installer/servers/pyright/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local npm = require "nvim-lsp-installer.core.managers.npm" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "python" }, - homepage = "https://github.com/microsoft/pyright", - installer = npm.packages { "pyright" }, - default_options = { - cmd_env = npm.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/quick_lint_js/init.lua b/lua/nvim-lsp-installer/servers/quick_lint_js/init.lua deleted file mode 100644 index f9397f9b..00000000 --- a/lua/nvim-lsp-installer/servers/quick_lint_js/init.lua +++ /dev/null @@ -1,55 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local platform = require "nvim-lsp-installer.core.platform" -local path = require "nvim-lsp-installer.core.path" -local functional = require "nvim-lsp-installer.core.functional" -local process = require "nvim-lsp-installer.core.process" -local std = require "nvim-lsp-installer.core.managers.std" -local github = require "nvim-lsp-installer.core.managers.github" - -local coalesce, when = functional.coalesce, functional.when - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://quick-lint-js.com/", - languages = { "javascript" }, - ---@async - installer = function() - local repo = "quick-lint/quick-lint-js" - local release_file = assert( - coalesce( - when(platform.is.mac_x64, "macos.tar.gz"), - when(platform.is.mac_arm64, "macos-aarch64.tar.gz"), - when(platform.is.linux_x64, "linux.tar.gz"), - when(platform.is.linux_arm64, "linux-aarch64.tar.gz"), - when(platform.is.linux_arm, "linux-armhf.tar.gz"), - when(platform.is.win_x64, "windows.zip"), - when(platform.is.win_arm64, "windows-arm64.zip"), - when(platform.is.win_arm, "windows-arm.zip") - ), - "Current platform is not supported." - ) - - local source = github.tag { repo = repo } - source.with_receipt() - - local url = ("https://c.quick-lint-js.com/releases/%s/manual/%s"):format(source.tag, release_file) - platform.when { - unix = function() - std.download_file(url, "archive.tar.gz") - std.untar("archive.tar.gz", { strip_components = 1 }) - end, - win = function() - std.download_file(url, "archive.zip") - std.unzip("archive.zip", ".") - end, - } - end, - default_options = { - cmd_env = { - PATH = process.extend_path { path.concat { root_dir, "bin" } }, - }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/r_language_server/init.lua b/lua/nvim-lsp-installer/servers/r_language_server/init.lua deleted file mode 100644 index 6b665adf..00000000 --- a/lua/nvim-lsp-installer/servers/r_language_server/init.lua +++ /dev/null @@ -1,71 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local path = require "nvim-lsp-installer.core.path" - -return function(name, root_dir) - local function create_install_script(install_dir) - return ([[ -options(langserver_library = %q); -options(langserver_quiet = FALSE); -options(repos = list(CRAN = "http://cran.rstudio.com/")); -rlsLib <- getOption("langserver_library"); -.libPaths(new = rlsLib); - -didInstallRemotes <- FALSE; -tryCatch( - expr = { library("remotes") }, - error = function (e) { - install.packages("remotes", lib = rlsLib); - loadNamespace("remotes", lib.loc = rlsLib); - didInstallRemotes <- TRUE; - } -); - -# We set force = TRUE because this command will error if languageserversetup is already installed (even if it's at a -# different library location). -remotes::install_github("jozefhajnala/languageserversetup", lib = rlsLib, force = TRUE); - -if (didInstallRemotes) { - remove.packages("remotes", lib = rlsLib); -} - -loadNamespace("languageserversetup", lib.loc = rlsLib); -languageserversetup::languageserver_install( - fullReinstall = FALSE, - confirmBeforeInstall = FALSE, - strictLibrary = TRUE -); -library("languageserver", lib.loc = rlsLib); -]]):format(install_dir) - end - - local server_script = ([[ -options("langserver_library" = %q); -rlsLib <- getOption("langserver_library"); -.libPaths(new = c(rlsLib, .libPaths())); -loadNamespace("languageserver", lib.loc = rlsLib); -languageserver::run(); - ]]):format(root_dir) - - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://github.com/REditorSupport/languageserver", - languages = { "R" }, - ---@param ctx InstallContext - installer = function(ctx) - ctx.spawn.R { - "--no-save", - on_spawn = function(_, stdio) - local stdin = stdio[1] - stdin:write(create_install_script(ctx.cwd:get())) - stdin:close() - end, - } - ctx.fs:write_file("server.R", server_script) - ctx.receipt:with_primary_source(ctx.receipt.r_package "languageserver") - end, - default_options = { - cmd = { "R", "--slave", "-f", path.concat { root_dir, "server.R" } }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/reason_ls/init.lua b/lua/nvim-lsp-installer/servers/reason_ls/init.lua deleted file mode 100644 index 3abb4888..00000000 --- a/lua/nvim-lsp-installer/servers/reason_ls/init.lua +++ /dev/null @@ -1,35 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local platform = require "nvim-lsp-installer.core.platform" -local path = require "nvim-lsp-installer.core.path" -local functional = require "nvim-lsp-installer.core.functional" -local process = require "nvim-lsp-installer.core.process" -local github = require "nvim-lsp-installer.core.managers.github" - -local coalesce, when = functional.coalesce, functional.when - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "reason" }, - homepage = "https://github.com/jaredly/reason-language-server", - ---@param ctx InstallContext - installer = function(ctx) - local archive_name = coalesce( - when(platform.is_mac, "rls-macos"), - when(platform.is_linux, "rls-linux"), - when(platform.is_win, "rls-windows") - ) - github.unzip_release_file({ - repo = "jaredly/reason-language-server", - asset_file = ("%s.zip"):format(archive_name), - }).with_receipt() - ctx.fs:rename(archive_name, "reason") - end, - default_options = { - cmd_env = { - PATH = process.extend_path { path.concat { root_dir, "reason" } }, - }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/remark_ls/init.lua b/lua/nvim-lsp-installer/servers/remark_ls/init.lua deleted file mode 100644 index 3cedbab0..00000000 --- a/lua/nvim-lsp-installer/servers/remark_ls/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local npm = require "nvim-lsp-installer.core.managers.npm" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://github.com/remarkjs/remark-language-server", - languages = { "markdown" }, - installer = npm.packages { "remark-language-server" }, - default_options = { - cmd_env = npm.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/rescriptls/init.lua b/lua/nvim-lsp-installer/servers/rescriptls/init.lua deleted file mode 100644 index 398d2777..00000000 --- a/lua/nvim-lsp-installer/servers/rescriptls/init.lua +++ /dev/null @@ -1,23 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local path = require "nvim-lsp-installer.core.path" -local github = require "nvim-lsp-installer.core.managers.github" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "rescript" }, - homepage = "https://github.com/rescript-lang/rescript-vscode", - installer = function() - github.unzip_release_file({ - repo = "rescript-lang/rescript-vscode", - asset_file = function(version) - return ("rescript-vscode-%s.vsix"):format(version) - end, - }).with_receipt() - end, - default_options = { - cmd = { "node", path.concat { root_dir, "extension", "server", "out", "server.js" }, "--stdio" }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/rnix/init.lua b/lua/nvim-lsp-installer/servers/rnix/init.lua deleted file mode 100644 index a79cec88..00000000 --- a/lua/nvim-lsp-installer/servers/rnix/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local cargo = require "nvim-lsp-installer.core.managers.cargo" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "nix" }, - homepage = "https://github.com/nix-community/rnix-lsp", - installer = cargo.crate "rnix-lsp", - default_options = { - cmd_env = cargo.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/robotframework_ls/init.lua b/lua/nvim-lsp-installer/servers/robotframework_ls/init.lua deleted file mode 100644 index b890d6fb..00000000 --- a/lua/nvim-lsp-installer/servers/robotframework_ls/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local pip3 = require "nvim-lsp-installer.core.managers.pip3" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - installer = pip3.packages { "robotframework-lsp" }, - languages = { "robot" }, - homepage = "https://github.com/robocorp/robotframework-lsp", - default_options = { - cmd_env = pip3.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/rome/init.lua b/lua/nvim-lsp-installer/servers/rome/init.lua deleted file mode 100644 index c664ca2c..00000000 --- a/lua/nvim-lsp-installer/servers/rome/init.lua +++ /dev/null @@ -1,22 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local npm = require "nvim-lsp-installer.core.managers.npm" -local Optional = require "nvim-lsp-installer.core.optional" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "typescript", "javascript" }, - homepage = "https://rome.tools", - ---@param ctx InstallContext - installer = function(ctx) - ctx.requested_version = ctx.requested_version:or_(function() - return Optional.of "10.0.7-nightly.2021.7.27" - end) - npm.install({ "rome" }).with_receipt() - end, - default_options = { - cmd_env = npm.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/rust_analyzer/init.lua b/lua/nvim-lsp-installer/servers/rust_analyzer/init.lua deleted file mode 100644 index c3d228f4..00000000 --- a/lua/nvim-lsp-installer/servers/rust_analyzer/init.lua +++ /dev/null @@ -1,65 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local process = require "nvim-lsp-installer.core.process" -local platform = require "nvim-lsp-installer.core.platform" -local functional = require "nvim-lsp-installer.core.functional" -local github = require "nvim-lsp-installer.core.managers.github" -local std = require "nvim-lsp-installer.core.managers.std" - -local coalesce, when = functional.coalesce, functional.when - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://rust-analyzer.github.io", - languages = { "rust" }, - installer = function() - local libc = platform.get_libc() - - local asset_file = coalesce( - when( - platform.is_mac, - coalesce( - when(platform.arch == "arm64", "rust-analyzer-aarch64-apple-darwin.gz"), - when(platform.arch == "x64", "rust-analyzer-x86_64-apple-darwin.gz") - ) - ), - when( - platform.is_linux, - coalesce( - when( - libc == "glibc", - coalesce( - when(platform.arch == "arm64", "rust-analyzer-aarch64-unknown-linux-gnu.gz"), - when(platform.arch == "x64", "rust-analyzer-x86_64-unknown-linux-gnu.gz") - ) - ), - when( - libc == "musl", - coalesce(when(platform.arch == "x64", "rust-analyzer-x86_64-unknown-linux-musl.gz")) - ) - ) - ), - when( - platform.is_win, - coalesce( - when(platform.arch == "arm64", "rust-analyzer-aarch64-pc-windows-msvc.gz"), - when(platform.arch == "x64", "rust-analyzer-x86_64-pc-windows-msvc.gz") - ) - ) - ) - - github.gunzip_release_file({ - repo = "rust-lang/rust-analyzer", - asset_file = asset_file, - out_file = platform.is_win and "rust-analyzer.exe" or "rust-analyzer", - }).with_receipt() - std.chmod("+x", { "rust-analyzer" }) - end, - default_options = { - cmd_env = { - PATH = process.extend_path { root_dir }, - }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/salt_ls/init.lua b/lua/nvim-lsp-installer/servers/salt_ls/init.lua deleted file mode 100644 index bfc74069..00000000 --- a/lua/nvim-lsp-installer/servers/salt_ls/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local pip3 = require "nvim-lsp-installer.core.managers.pip3" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "sls" }, - homepage = "https://github.com/dcermak/salt-lsp", - installer = pip3.packages { "salt-lsp" }, - default_options = { - cmd_env = pip3.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/scry/init.lua b/lua/nvim-lsp-installer/servers/scry/init.lua deleted file mode 100644 index bc6d678a..00000000 --- a/lua/nvim-lsp-installer/servers/scry/init.lua +++ /dev/null @@ -1,30 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local process = require "nvim-lsp-installer.core.process" -local path = require "nvim-lsp-installer.core.path" -local std = require "nvim-lsp-installer.core.managers.std" -local git = require "nvim-lsp-installer.core.managers.git" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "crystal" }, - homepage = "https://github.com/crystal-lang-tools/scry", - ---@param ctx InstallContext - installer = function(ctx) - std.ensure_executable("crystal", { - help_url = "https://crystal-lang.org/install/", - }) - std.ensure_executable("shards", { - help_url = "https://crystal-lang.org/install/", - }) - git.clone({ "https://github.com/crystal-lang-tools/scry.git" }).with_receipt() - ctx.spawn.shards { "build", "--verbose", "--release" } - end, - default_options = { - cmd_env = { - PATH = process.extend_path { path.concat { root_dir, "bin" } }, - }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/serve_d/init.lua b/lua/nvim-lsp-installer/servers/serve_d/init.lua deleted file mode 100644 index 04dfa674..00000000 --- a/lua/nvim-lsp-installer/servers/serve_d/init.lua +++ /dev/null @@ -1,47 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local platform = require "nvim-lsp-installer.core.platform" -local functional = require "nvim-lsp-installer.core.functional" -local process = require "nvim-lsp-installer.core.process" -local github = require "nvim-lsp-installer.core.managers.github" - -local coalesce, when = functional.coalesce, functional.when - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://github.com/Pure-D/serve-d", - languages = { "d" }, - installer = function() - local repo = "Pure-D/serve-d" - platform.when { - unix = function() - github.untarxz_release_file({ - repo = repo, - asset_file = function(release) - local target = coalesce( - when(platform.is_mac, "serve-d_%s-osx-x86_64.tar.xz"), - when(platform.is_linux and platform.arch == "x64", "serve-d_%s-linux-x86_64.tar.xz") - ) - return target and target:format(release:gsub("^v", "")) - end, - }).with_receipt() - end, - win = function() - github.unzip_release_file({ - repo = repo, - asset_file = function(release) - local target = coalesce(when(platform.arch == "x64"), "serve-d_%s-windows-x86_64.zip") - return target and target:format(release:gsub("^v", "")) - end, - }).with_receipt() - end, - } - end, - default_options = { - cmd_env = { - PATH = process.extend_path { root_dir }, - }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/slint_lsp/init.lua b/lua/nvim-lsp-installer/servers/slint_lsp/init.lua deleted file mode 100644 index 8ade21f1..00000000 --- a/lua/nvim-lsp-installer/servers/slint_lsp/init.lua +++ /dev/null @@ -1,36 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local path = require "nvim-lsp-installer.core.path" -local platform = require "nvim-lsp-installer.core.platform" -local process = require "nvim-lsp-installer.core.process" -local github = require "nvim-lsp-installer.core.managers.github" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://slint-ui.com/", - languages = { "slint" }, - installer = function() - local repo = "slint-ui/slint" - platform.when { - win = function() - github.unzip_release_file({ - repo = repo, - asset_file = "slint-lsp-windows.zip", - }).with_receipt() - end, - linux = function() - github.untargz_release_file({ - repo = repo, - asset_file = "slint-lsp-linux.tar.gz", - }).with_receipt() - end, - } - end, - default_options = { - cmd_env = { - PATH = process.extend_path { path.concat { root_dir, "slint-lsp" } }, - }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/solang/init.lua b/lua/nvim-lsp-installer/servers/solang/init.lua deleted file mode 100644 index 877dc86e..00000000 --- a/lua/nvim-lsp-installer/servers/solang/init.lua +++ /dev/null @@ -1,70 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local path = require "nvim-lsp-installer.core.path" -local functional = require "nvim-lsp-installer.core.functional" -local platform = require "nvim-lsp-installer.core.platform" -local process = require "nvim-lsp-installer.core.process" -local std = require "nvim-lsp-installer.core.managers.std" -local github = require "nvim-lsp-installer.core.managers.github" - -local coalesce, when = functional.coalesce, functional.when - -return function(name, root_dir) - ---@async - local function download_solang() - local source = github.download_release_file({ - repo = "hyperledger-labs/solang", - out_file = platform.is_win and "solang.exe" or "solang", - asset_file = coalesce( - when(platform.is_mac and platform.arch == "x64", "solang-mac-intel"), - when(platform.is_mac and platform.arch == "arm64", "solang-mac-arm"), - when(platform.is_linux and platform.arch == "arm64", "solang-linux-arm64"), - when(platform.is_linux and platform.arch == "x64", "solang-linux-x86-64"), - when(platform.is_win, "solang.exe") - ), - }).with_receipt() - std.chmod("+x", { "solang" }) - return source - end - - ---@async - ---Solang needs a build of llvm with some extra patches. - local function download_llvm() - local source = github.release_file { - repo = "hyperledger-labs/solang", - asset_file = coalesce( - when(platform.is_mac and platform.arch == "x64", "llvm13.0-mac-intel.tar.xz"), - when(platform.is_mac and platform.arch == "arm64", "llvm13.0-mac-arm.tar.xz"), - when(platform.is_linux and platform.arch == "x64", "llvm13.0-linux-x86-64.tar.xz"), - when(platform.is_linux and platform.arch == "arm64", "llvm13.0-linux-arm64.tar.xz"), - when(platform.is_win, "llvm13.0-win.zip") - ), - } - if platform.is_win then - std.download_file(source.download_url, "llvm.zip") - std.unzip("llvm.zip", ".") - else - std.download_file(source.download_url, "llvm.tar.xz") - std.untar "llvm.tar.xz" - end - end - - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://solang.readthedocs.io/en/latest/", - languages = { "solidity" }, - ---@param ctx InstallContext - installer = function(ctx) - ctx:run_concurrently { download_solang, download_llvm } - end, - default_options = { - cmd_env = { - PATH = process.extend_path { - path.concat { root_dir }, - path.concat { root_dir, "llvm13.0", "bin" }, - path.concat { root_dir, "llvm12.0", "bin" }, -- kept for backwards compatibility - }, - }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/solargraph/init.lua b/lua/nvim-lsp-installer/servers/solargraph/init.lua deleted file mode 100644 index 0a6f1fe9..00000000 --- a/lua/nvim-lsp-installer/servers/solargraph/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local gem = require "nvim-lsp-installer.core.managers.gem" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "ruby" }, - homepage = "https://solargraph.org", - installer = gem.packages { "solargraph" }, - default_options = { - cmd_env = gem.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/solc/init.lua b/lua/nvim-lsp-installer/servers/solc/init.lua deleted file mode 100644 index 1f74f56e..00000000 --- a/lua/nvim-lsp-installer/servers/solc/init.lua +++ /dev/null @@ -1,34 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local functional = require "nvim-lsp-installer.core.functional" -local platform = require "nvim-lsp-installer.core.platform" -local process = require "nvim-lsp-installer.core.process" -local github = require "nvim-lsp-installer.core.managers.github" -local std = require "nvim-lsp-installer.core.managers.std" - -local coalesce, when = functional.coalesce, functional.when - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://github.com/ethereum/solidity", - languages = { "solidity" }, - installer = function() - github.download_release_file({ - repo = "ethereum/solidity", - out_file = platform.is_win and "solc.exe" or "solc", - asset_file = coalesce( - when(platform.is_mac, "solc-macos"), - when(platform.is_linux, "solc-static-linux"), - when(platform.is_win, "solc-windows.exe") - ), - }).with_receipt() - std.chmod("+x", { "solc" }) - end, - default_options = { - cmd_env = { - PATH = process.extend_path { root_dir }, - }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/solidity_ls/init.lua b/lua/nvim-lsp-installer/servers/solidity_ls/init.lua deleted file mode 100644 index 1f8b6e71..00000000 --- a/lua/nvim-lsp-installer/servers/solidity_ls/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local npm = require "nvim-lsp-installer.core.managers.npm" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "solidity" }, - homepage = "https://github.com/edag94/vscode-solidity", - installer = npm.packages { "solidity-language-server" }, - default_options = { - cmd_env = npm.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/sorbet/init.lua b/lua/nvim-lsp-installer/servers/sorbet/init.lua deleted file mode 100644 index 8095f289..00000000 --- a/lua/nvim-lsp-installer/servers/sorbet/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local gem = require "nvim-lsp-installer.core.managers.gem" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://sorbet.org/", - languages = { "ruby" }, - installer = gem.packages { "sorbet" }, - default_options = { - cmd_env = gem.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/sourcekit/init.lua b/lua/nvim-lsp-installer/servers/sourcekit/init.lua deleted file mode 100644 index 7485701d..00000000 --- a/lua/nvim-lsp-installer/servers/sourcekit/init.lua +++ /dev/null @@ -1,13 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local std = require "nvim-lsp-installer.core.managers.std" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://github.com/apple/sourcekit-lsp", - languages = { "swift" }, - installer = std.system_executable("sourcekit-lsp", { help_url = "https://github.com/apple/sourcekit-lsp" }), - default_options = {}, - } -end diff --git a/lua/nvim-lsp-installer/servers/sourcery/init.lua b/lua/nvim-lsp-installer/servers/sourcery/init.lua deleted file mode 100644 index 98d3dff9..00000000 --- a/lua/nvim-lsp-installer/servers/sourcery/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local pip3 = require "nvim-lsp-installer.core.managers.pip3" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "python" }, - homepage = "https://docs.sourcery.ai/", - installer = pip3.packages { "sourcery-cli" }, - default_options = { - cmd_env = pip3.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/sqlls/init.lua b/lua/nvim-lsp-installer/servers/sqlls/init.lua deleted file mode 100644 index dd818b82..00000000 --- a/lua/nvim-lsp-installer/servers/sqlls/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local npm = require "nvim-lsp-installer.core.managers.npm" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "sql" }, - homepage = "https://github.com/joe-re/sql-language-server", - installer = npm.packages { "sql-language-server" }, - default_options = { - cmd_env = npm.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/sqls/init.lua b/lua/nvim-lsp-installer/servers/sqls/init.lua deleted file mode 100644 index f067bc0e..00000000 --- a/lua/nvim-lsp-installer/servers/sqls/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local go = require "nvim-lsp-installer.core.managers.go" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "sql" }, - homepage = "https://github.com/lighttiger2505/sqls", - installer = go.packages { "github.com/lighttiger2505/sqls" }, - default_options = { - cmd_env = go.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/stylelint_lsp/init.lua b/lua/nvim-lsp-installer/servers/stylelint_lsp/init.lua deleted file mode 100644 index a8e84e39..00000000 --- a/lua/nvim-lsp-installer/servers/stylelint_lsp/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local npm = require "nvim-lsp-installer.core.managers.npm" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://github.com/bmatcuk/stylelint-lsp", - languages = { "stylelint" }, - installer = npm.packages { "stylelint-lsp" }, - default_options = { - cmd_env = npm.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/sumneko_lua/init.lua b/lua/nvim-lsp-installer/servers/sumneko_lua/init.lua deleted file mode 100644 index 71a0f655..00000000 --- a/lua/nvim-lsp-installer/servers/sumneko_lua/init.lua +++ /dev/null @@ -1,56 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local path = require "nvim-lsp-installer.core.path" -local platform = require "nvim-lsp-installer.core.platform" -local functional = require "nvim-lsp-installer.core.functional" -local process = require "nvim-lsp-installer.core.process" -local github = require "nvim-lsp-installer.core.managers.github" - -local coalesce, when = functional.coalesce, functional.when - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "lua" }, - homepage = "https://github.com/sumneko/lua-language-server", - installer = function() - github.unzip_release_file({ - repo = "sumneko/vscode-lua", - asset_file = function(version) - local target = coalesce( - when( - platform.is_mac, - coalesce( - when(platform.arch == "x64", "vscode-lua-%s-darwin-x64.vsix"), - when(platform.arch == "arm64", "vscode-lua-%s-darwin-arm64.vsix") - ) - ), - when( - platform.is_linux, - coalesce( - when(platform.arch == "x64", "vscode-lua-%s-linux-x64.vsix"), - when(platform.arch == "arm64", "vscode-lua-%s-linux-arm64.vsix") - ) - ), - when( - platform.is_win, - coalesce( - when(platform.arch == "x64", "vscode-lua-%s-win32-x64.vsix"), - when(platform.arch == "x86", "vscode-lua-%s-win32-ia32.vsix") - ) - ) - ) - - return target and target:format(version) - end, - }).with_receipt() - end, - default_options = { - cmd_env = { - PATH = process.extend_path { - path.concat { root_dir, "extension", "server", "bin" }, - }, - }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/svelte/init.lua b/lua/nvim-lsp-installer/servers/svelte/init.lua deleted file mode 100644 index f39c5fb0..00000000 --- a/lua/nvim-lsp-installer/servers/svelte/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local npm = require "nvim-lsp-installer.core.managers.npm" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "svelte" }, - homepage = "https://github.com/sveltejs/language-tools", - installer = npm.packages { "svelte-language-server" }, - default_options = { - cmd_env = npm.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/svlangserver/init.lua b/lua/nvim-lsp-installer/servers/svlangserver/init.lua deleted file mode 100644 index 56d2ecd4..00000000 --- a/lua/nvim-lsp-installer/servers/svlangserver/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local npm = require "nvim-lsp-installer.core.managers.npm" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://github.com/imc-trading/svlangserver", - languages = { "systemverilog" }, - installer = npm.packages { "@imc-trading/svlangserver" }, - default_options = { - cmd_env = npm.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/svls/init.lua b/lua/nvim-lsp-installer/servers/svls/init.lua deleted file mode 100644 index a8e59ff4..00000000 --- a/lua/nvim-lsp-installer/servers/svls/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local cargo = require "nvim-lsp-installer.core.managers.cargo" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "systemverilog" }, - homepage = "https://github.com/dalance/svls", - installer = cargo.crate "svls", - default_options = { - cmd_env = cargo.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/tailwindcss/init.lua b/lua/nvim-lsp-installer/servers/tailwindcss/init.lua deleted file mode 100644 index fa7caa8f..00000000 --- a/lua/nvim-lsp-installer/servers/tailwindcss/init.lua +++ /dev/null @@ -1,14 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local npm = require "nvim-lsp-installer.core.managers.npm" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "tailwind" }, - installer = npm.packages { "@tailwindcss/language-server" }, - default_options = { - cmd_env = npm.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/taplo/init.lua b/lua/nvim-lsp-installer/servers/taplo/init.lua deleted file mode 100644 index a93c1a0f..00000000 --- a/lua/nvim-lsp-installer/servers/taplo/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local cargo = require "nvim-lsp-installer.core.managers.cargo" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "toml" }, - homepage = "https://taplo.tamasfe.dev/lsp/", - installer = cargo.crate "taplo-cli", - default_options = { - cmd_env = cargo.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/teal_ls/init.lua b/lua/nvim-lsp-installer/servers/teal_ls/init.lua deleted file mode 100644 index e1406355..00000000 --- a/lua/nvim-lsp-installer/servers/teal_ls/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local luarocks = require "nvim-lsp-installer.core.managers.luarocks" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "teal" }, - homepage = "https://github.com/teal-language/teal-language-server", - installer = luarocks.package("teal-language-server", { dev = true }), - default_options = { - cmd_env = luarocks.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/terraformls/init.lua b/lua/nvim-lsp-installer/servers/terraformls/init.lua deleted file mode 100644 index 0a7be532..00000000 --- a/lua/nvim-lsp-installer/servers/terraformls/init.lua +++ /dev/null @@ -1,50 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local process = require "nvim-lsp-installer.core.process" -local platform = require "nvim-lsp-installer.core.platform" -local functional = require "nvim-lsp-installer.core.functional" -local github = require "nvim-lsp-installer.core.managers.github" - -local coalesce, when = functional.coalesce, functional.when - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://github.com/hashicorp/terraform-ls", - languages = { "terraform" }, - installer = function() - github.unzip_release_file({ - repo = "hashicorp/terraform-ls", - asset_file = function(version) - local target = coalesce( - when( - platform.is_mac, - coalesce( - when(platform.arch == "arm64", "terraform-ls_%s_darwin_arm64.zip"), - when(platform.arch == "x64", "terraform-ls_%s_darwin_amd64.zip") - ) - ), - when( - platform.is_linux, - coalesce( - when(platform.arch == "arm64", "terraform-ls_%s_linux_arm64.zip"), - when(platform.arch == "arm", "terraform-ls_%s_linux_arm.zip"), - when(platform.arch == "x64", "terraform-ls_%s_linux_amd64.zip") - ) - ), - when( - platform.is_win, - coalesce(when(platform.arch == "x64", "terraform-ls_%s_windows_amd64.zip")) - ) - ) - return target and target:format(version:gsub("^v", "")) - end, - }).with_receipt() - end, - default_options = { - cmd_env = { - PATH = process.extend_path { root_dir }, - }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/texlab/init.lua b/lua/nvim-lsp-installer/servers/texlab/init.lua deleted file mode 100644 index e61c7b3c..00000000 --- a/lua/nvim-lsp-installer/servers/texlab/init.lua +++ /dev/null @@ -1,41 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local process = require "nvim-lsp-installer.core.process" -local functional = require "nvim-lsp-installer.core.functional" -local platform = require "nvim-lsp-installer.core.platform" -local github = require "nvim-lsp-installer.core.managers.github" - -local coalesce, when = functional.coalesce, functional.when - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://github.com/latex-lsp/texlab", - languages = { "latex" }, - installer = function() - local repo = "latex-lsp/texlab" - platform.when { - unix = function() - github.untargz_release_file({ - repo = repo, - asset_file = coalesce( - when(platform.is_mac, "texlab-x86_64-macos.tar.gz"), - when(platform.is_linux and platform.arch == "x64", "texlab-x86_64-linux.tar.gz") - ), - }).with_receipt() - end, - win = function() - github.unzip_release_file({ - repo = repo, - asset_file = coalesce(when(platform.arch == "x64", "texlab-x86_64-windows.zip")), - }).with_receipt() - end, - } - end, - default_options = { - cmd_env = { - PATH = process.extend_path { root_dir }, - }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/tflint/README.md b/lua/nvim-lsp-installer/servers/tflint/README.md deleted file mode 100644 index 51298d69..00000000 --- a/lua/nvim-lsp-installer/servers/tflint/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# tflint - -## Installing TFLint plugins - -TFLint has [third party plugins](https://github.com/terraform-linters/tflint/blob/master/docs/user-guide/plugins.md) which are not installed by default. - -To install TFLint plugins, there's a convenient `:TFLintInit` command that does this for you. It will use Neovim's -current working directory to locate the plugins to install (according to `tflint --init`): - -``` -:TFLintInit -``` - -The `:TFLintInit` command will only be available once the `tflint` server has been set up. diff --git a/lua/nvim-lsp-installer/servers/tflint/init.lua b/lua/nvim-lsp-installer/servers/tflint/init.lua deleted file mode 100644 index bf370fe3..00000000 --- a/lua/nvim-lsp-installer/servers/tflint/init.lua +++ /dev/null @@ -1,66 +0,0 @@ -local a = require "nvim-lsp-installer.core.async" -local notify = require "nvim-lsp-installer.notify" -local spawn = require "nvim-lsp-installer.core.spawn" -local process = require "nvim-lsp-installer.core.process" -local server = require "nvim-lsp-installer.server" -local functional = require "nvim-lsp-installer.core.functional" -local platform = require "nvim-lsp-installer.core.platform" -local github = require "nvim-lsp-installer.core.managers.github" -local middleware = require "nvim-lsp-installer.middleware" - -local coalesce, when = functional.coalesce, functional.when - -return function(name, root_dir) - middleware.register_server_hook(name, function() - vim.api.nvim_create_user_command( - "TFLintInit", - a.scope(function() - notify "Installing TFLint plugins…" - local result = spawn.tflint { - "--init", - cwd = vim.loop.cwd(), - stdio_sink = process.simple_sink(), - with_paths = { root_dir }, - } - if vim.in_fast_event() then - a.scheduler() - end - result - :on_success(function() - notify "Successfully installed TFLint plugins." - end) - :on_failure(function() - notify("Failed to install TFLint plugins.", vim.log.levels.ERROR) - end) - end), - { - desc = "[nvim-lsp-installer] Runs tflint --init in the current directory.", - } - ) - end) - - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "terraform" }, - homepage = "https://github.com/terraform-linters/tflint", - installer = function() - github.unzip_release_file({ - repo = "terraform-linters/tflint", - asset_file = coalesce( - when(platform.is_mac and platform.arch == "x64", "tflint_darwin_amd64.zip"), - when(platform.is_mac and platform.arch == "arm64", "tflint_darwin_arm64.zip"), - when(platform.is_linux and platform.arch == "x64", "tflint_linux_amd64.zip"), - when(platform.is_linux and platform.arch == "arm64", "tflint_linux_arm64.zip"), - when(platform.is_linux and platform.arch == "x86", "tflint_linux_386.zip"), - when(platform.is_win and platform.arch == "x64", "tflint_windows_amd64.zip") - ), - }).with_receipt() - end, - default_options = { - cmd_env = { - PATH = process.extend_path { root_dir }, - }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/theme_check/init.lua b/lua/nvim-lsp-installer/servers/theme_check/init.lua deleted file mode 100644 index e1bd3a3e..00000000 --- a/lua/nvim-lsp-installer/servers/theme_check/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local gem = require "nvim-lsp-installer.core.managers.gem" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "liquid" }, - homepage = "https://github.com/Shopify/theme-check", - installer = gem.packages { "theme-check" }, - default_options = { - cmd_env = gem.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/tsserver/init.lua b/lua/nvim-lsp-installer/servers/tsserver/init.lua deleted file mode 100644 index d9e2571e..00000000 --- a/lua/nvim-lsp-installer/servers/tsserver/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local npm = require "nvim-lsp-installer.core.managers.npm" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "typescript", "javascript" }, - homepage = "https://github.com/typescript-language-server/typescript-language-server", - installer = npm.packages { "typescript-language-server", "typescript" }, - default_options = { - cmd_env = npm.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/vala_ls/init.lua b/lua/nvim-lsp-installer/servers/vala_ls/init.lua deleted file mode 100644 index e02720c0..00000000 --- a/lua/nvim-lsp-installer/servers/vala_ls/init.lua +++ /dev/null @@ -1,41 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local path = require "nvim-lsp-installer.core.path" -local std = require "nvim-lsp-installer.core.managers.std" -local github = require "nvim-lsp-installer.core.managers.github" -local process = require "nvim-lsp-installer.core.process" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://wiki.gnome.org/Projects/Vala", - languages = { "vala" }, - ---@param ctx InstallContext - installer = function(ctx) - std.ensure_executable("meson", { help_url = "https://mesonbuild.com/Getting-meson.html" }) - std.ensure_executable("ninja", { help_url = "https://ninja-build.org/" }) - std.ensure_executable("valac", { help_url = "https://wiki.gnome.org/Projects/Vala" }) - - local release_source = github.untarxz_release_file { - repo = "Prince781/vala-language-server", - asset_file = function(version) - return ("vala-language-server-%s.tar.xz"):format(version) - end, - } - release_source.with_receipt() - - local vala_dirname = ("vala-language-server-%s"):format(release_source.release) - local install_dir = ctx.cwd:get() - ctx:chdir(vala_dirname, function() - ctx.spawn.meson { ("-Dprefix=%s"):format(install_dir), "build" } - ctx.spawn.ninja { "-C", "build", "install" } - end) - ctx.fs:rmrf(vala_dirname) - end, - default_options = { - cmd_env = { - PATH = process.extend_path { path.concat { root_dir, "bin" } }, - }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/verible/init.lua b/lua/nvim-lsp-installer/servers/verible/init.lua deleted file mode 100644 index 6673deff..00000000 --- a/lua/nvim-lsp-installer/servers/verible/init.lua +++ /dev/null @@ -1,73 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local process = require "nvim-lsp-installer.core.process" -local platform = require "nvim-lsp-installer.core.platform" -local functional = require "nvim-lsp-installer.core.functional" -local path = require "nvim-lsp-installer.core.path" -local github = require "nvim-lsp-installer.core.managers.github" - -local coalesce, when = functional.coalesce, functional.when - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://chipsalliance.github.io/verible/", - languages = { "systemverilog", "verilog" }, - ---@param ctx InstallContext - installer = function(ctx) - local repo = "chipsalliance/verible" - platform.when { - linux = function() - local os_dist = platform.os_distribution() - local source = github.untarxz_release_file { - repo = repo, - asset_file = function(release) - if os_dist.id == "ubuntu" then - local target_file = when( - platform.arch == "x64", - coalesce( - when( - os_dist.version.major == 16, - "verible-%s-Ubuntu-16.04-xenial-x86_64.tar.gz" - ), - when( - os_dist.version.major == 18, - "verible-%s-Ubuntu-18.04-bionic-x86_64.tar.gz" - ), - when(os_dist.version.major == 20, "verible-%s-Ubuntu-20.04-focal-x86_64.tar.gz"), - when(os_dist.version.major == 22, "verible-%s-Ubuntu-22.04-jammy-x86_64.tar.gz") - ) - ) - return target_file and target_file:format(release) - end - end, - } - source.with_receipt() - ctx.fs:rename(("verible-%s"):format(source.release), "verible") - end, - win = function() - local source = github.unzip_release_file { - repo = repo, - asset_file = function(release) - local target_file = coalesce(when(platform.arch == "x64", "verible-%s-win64.zip")) - return target_file and target_file:format(release) - end, - } - source.with_receipt() - ctx.fs:rename(("verible-%s-win64"):format(source.release), "verible") - end, - } - end, - default_options = { - cmd_env = { - PATH = process.extend_path { - path.concat(coalesce( - when(platform.is_win, { root_dir, "verible" }), - when(platform.is_unix, { root_dir, "verible", "bin" }), - { root_dir, "verible", "bin" } -- default - )), - }, - }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/vimls/init.lua b/lua/nvim-lsp-installer/servers/vimls/init.lua deleted file mode 100644 index ab5e72dc..00000000 --- a/lua/nvim-lsp-installer/servers/vimls/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local npm = require "nvim-lsp-installer.core.managers.npm" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "vim" }, - homepage = "https://github.com/iamcco/vim-language-server", - installer = npm.packages { "vim-language-server" }, - default_options = { - cmd_env = npm.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/visualforce_ls/init.lua b/lua/nvim-lsp-installer/servers/visualforce_ls/init.lua deleted file mode 100644 index fb6b559e..00000000 --- a/lua/nvim-lsp-installer/servers/visualforce_ls/init.lua +++ /dev/null @@ -1,50 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local github = require "nvim-lsp-installer.core.managers.github" -local github_client = require "nvim-lsp-installer.core.managers.github.client" -local Optional = require "nvim-lsp-installer.core.optional" -local path = require "nvim-lsp-installer.core.path" -local _ = require "nvim-lsp-installer.core.functional" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://github.com/forcedotcom/salesforcedx-vscode", - languages = { "visualforce" }, - ---@async - installer = function() - local repo = "forcedotcom/salesforcedx-vscode" - - -- See https://github.com/forcedotcom/salesforcedx-vscode/issues/4184#issuecomment-1146052086 - ---@type GitHubRelease - local release = github_client - .fetch_releases(repo) - :map(_.find_first(_.prop_satisfies(_.compose(_.gt(0), _.length), "assets"))) - :map(Optional.of_nilable) - :get_or_throw() -- Result unwrap - :or_else_throw "Failed to find release with assets." -- Optional unwrap - - github.unzip_release_file({ - version = Optional.of(release.tag_name), - asset_file = _.compose(_.format "salesforcedx-vscode-visualforce-%s.vsix", _.gsub("^v", "")), - repo = repo, - }).with_receipt() - end, - default_options = { - cmd = { - "node", - path.concat { - root_dir, - "extension", - "node_modules", - "@salesforce", - "salesforcedx-visualforce-language-server", - "out", - "src", - "visualforceServer.js", - }, - "--stdio", - }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/vls/init.lua b/lua/nvim-lsp-installer/servers/vls/init.lua deleted file mode 100644 index c531d2f6..00000000 --- a/lua/nvim-lsp-installer/servers/vls/init.lua +++ /dev/null @@ -1,42 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local github = require "nvim-lsp-installer.core.managers.github" -local github_client = require "nvim-lsp-installer.core.managers.github.client" -local std = require "nvim-lsp-installer.core.managers.std" -local functional = require "nvim-lsp-installer.core.functional" -local platform = require "nvim-lsp-installer.core.platform" -local Optional = require "nvim-lsp-installer.core.optional" -local process = require "nvim-lsp-installer.core.process" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://github.com/vlang/vls", - languages = { "vlang", "V" }, - ---@async - installer = function() - local repo = "vlang/vls" - - ---@type GitHubRelease - local latest_dev_build = - github_client.fetch_latest_release(repo, { include_prerelease = true }):get_or_throw() - - github.download_release_file({ - version = Optional.of(latest_dev_build.tag_name), - repo = repo, - out_file = platform.is.win and "vls.exe" or "vls", - asset_file = functional.coalesce( - functional.when(platform.is.linux_x64, "vls_linux_x64"), - functional.when(platform.is.mac, "vls_macos_x64"), - functional.when(platform.is.win_x64, "vls_windows_x64.exe") - ), - }).with_receipt() - std.chmod("+x", { "vls" }) - end, - default_options = { - cmd_env = { - PATH = process.extend_path { root_dir }, - }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/volar/init.lua b/lua/nvim-lsp-installer/servers/volar/init.lua deleted file mode 100644 index 725d086f..00000000 --- a/lua/nvim-lsp-installer/servers/volar/init.lua +++ /dev/null @@ -1,37 +0,0 @@ -local a = require "nvim-lsp-installer.core.async" -local path = require "nvim-lsp-installer.core.path" -local server = require "nvim-lsp-installer.server" -local npm = require "nvim-lsp-installer.core.managers.npm" -local fs = require "nvim-lsp-installer.core.fs" - -return function(name, root_dir) - ---@param dir string - local function get_tsserverlib_path(dir) - return path.concat { dir, "node_modules", "typescript", "lib", "tsserverlibrary.js" } - end - - ---@param workspace_dir string|nil - local function get_typescript_server_path(workspace_dir) - local local_tsserverlib = workspace_dir ~= nil and get_tsserverlib_path(workspace_dir) - local vendored_tsserverlib = get_tsserverlib_path(root_dir) - if local_tsserverlib and fs.sync.file_exists(local_tsserverlib) then - return local_tsserverlib - else - return vendored_tsserverlib - end - end - - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://github.com/johnsoncodehk/volar", - languages = { "vue" }, - installer = npm.packages { "@volar/vue-language-server", "typescript" }, - default_options = { - cmd_env = npm.env(root_dir), - on_new_config = function(new_config, new_root_dir) - new_config.init_options.typescript.serverPath = get_typescript_server_path(new_root_dir) - end, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/vscode-langservers-extracted/init.lua b/lua/nvim-lsp-installer/servers/vscode-langservers-extracted/init.lua deleted file mode 100644 index a8441328..00000000 --- a/lua/nvim-lsp-installer/servers/vscode-langservers-extracted/init.lua +++ /dev/null @@ -1,17 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local npm = require "nvim-lsp-installer.core.managers.npm" - ----@param languages string[] -return function(languages) - return function(name, root_dir) - return server.Server:new { - name = name, - languages = languages, - root_dir = root_dir, - installer = npm.packages { "vscode-langservers-extracted" }, - default_options = { - cmd_env = npm.env(root_dir), - }, - } - end -end diff --git a/lua/nvim-lsp-installer/servers/vuels/init.lua b/lua/nvim-lsp-installer/servers/vuels/init.lua deleted file mode 100644 index 5d403953..00000000 --- a/lua/nvim-lsp-installer/servers/vuels/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local npm = require "nvim-lsp-installer.core.managers.npm" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "vue" }, - homepage = "https://github.com/vuejs/vetur", - installer = npm.packages { "vls" }, - default_options = { - cmd_env = npm.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/wgsl_analyzer/init.lua b/lua/nvim-lsp-installer/servers/wgsl_analyzer/init.lua deleted file mode 100644 index b7bd9554..00000000 --- a/lua/nvim-lsp-installer/servers/wgsl_analyzer/init.lua +++ /dev/null @@ -1,19 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local cargo = require "nvim-lsp-installer.core.managers.cargo" - -return function(name, root_dir) - local homepage = "https://github.com/wgsl-analyzer/wgsl-analyzer" - - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "wgsl" }, - homepage = homepage, - installer = cargo.crate("wgsl_analyzer", { - git = homepage, - }), - default_options = { - cmd_env = cargo.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/yamlls/init.lua b/lua/nvim-lsp-installer/servers/yamlls/init.lua deleted file mode 100644 index 0cfb3e41..00000000 --- a/lua/nvim-lsp-installer/servers/yamlls/init.lua +++ /dev/null @@ -1,15 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local npm = require "nvim-lsp-installer.core.managers.npm" - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - languages = { "yaml" }, - homepage = "https://github.com/redhat-developer/yaml-language-server", - installer = npm.packages { "yaml-language-server" }, - default_options = { - cmd_env = npm.env(root_dir), - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/zk/init.lua b/lua/nvim-lsp-installer/servers/zk/init.lua deleted file mode 100644 index e309c4fd..00000000 --- a/lua/nvim-lsp-installer/servers/zk/init.lua +++ /dev/null @@ -1,54 +0,0 @@ -local server = require "nvim-lsp-installer.server" -local platform = require "nvim-lsp-installer.core.platform" -local functional = require "nvim-lsp-installer.core.functional" -local process = require "nvim-lsp-installer.core.process" -local github = require "nvim-lsp-installer.core.managers.github" - -local coalesce, when = functional.coalesce, functional.when -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://github.com/mickael-menu/zk", - languages = { "markdown" }, - installer = function() - local repo = "mickael-menu/zk" - platform.when { - mac = function() - github.unzip_release_file({ - repo = repo, - asset_file = coalesce( - when(platform.arch == "arm64", function(version) - return ("zk-%s-macos-arm64.zip"):format(version) - end), - when(platform.arch == "x64", function(version) - return ("zk-%s-macos-x86_64.zip"):format(version) - end) - ), - }):with_receipt() - end, - linux = function() - github.untargz_release_file({ - repo = repo, - asset_file = coalesce( - when(platform.arch == "arm64", function(version) - return ("zk-%s-linux-arm64.tar.gz"):format(version) - end), - when(platform.arch == "x64", function(version) - return ("zk-%s-linux-amd64.tar.gz"):format(version) - end), - when(platform.arch == "x86", function(version) - return ("zk-%s-linux-i386.tar.gz"):format(version) - end) - ), - }).with_receipt() - end, - } - end, - default_options = { - cmd_env = { - PATH = process.extend_path { root_dir }, - }, - }, - } -end diff --git a/lua/nvim-lsp-installer/servers/zls/init.lua b/lua/nvim-lsp-installer/servers/zls/init.lua deleted file mode 100644 index 1b262d77..00000000 --- a/lua/nvim-lsp-installer/servers/zls/init.lua +++ /dev/null @@ -1,43 +0,0 @@ -local path = require "nvim-lsp-installer.core.path" -local server = require "nvim-lsp-installer.server" -local platform = require "nvim-lsp-installer.core.platform" -local functional = require "nvim-lsp-installer.core.functional" -local process = require "nvim-lsp-installer.core.process" -local github = require "nvim-lsp-installer.core.managers.github" -local std = require "nvim-lsp-installer.core.managers.std" - -local coalesce, when = functional.coalesce, functional.when - -return function(name, root_dir) - return server.Server:new { - name = name, - root_dir = root_dir, - homepage = "https://github.com/zigtools/zls", - languages = { "zig" }, - ---@param ctx InstallContext - installer = function(ctx) - local asset_file = coalesce( - when(platform.is_mac, "x86_64-macos.tar.xz"), - when( - platform.is_linux, - coalesce( - when(platform.arch == "x64", "x86_64-linux.tar.xz"), - when(platform.arch == "x86", "i386-linux.tar.xz") - ) - ), - when(platform.is_win and platform.arch == "x64", "x86_64-windows.tar.xz") - ) - github.untarxz_release_file({ - repo = "zigtools/zls", - asset_file = asset_file, - }).with_receipt() - ctx.fs:rename("bin", "package") - std.chmod("+x", { path.concat { "package", "zls" } }) - end, - default_options = { - cmd_env = { - PATH = process.extend_path { path.concat { root_dir, "package" } }, - }, - }, - } -end |
