diff options
130 files changed, 33 insertions, 1745 deletions
diff --git a/lua/nvim-lsp-installer.lua b/lua/nvim-lsp-installer.lua index 631f66a2..e65fb1dc 100644 --- a/lua/nvim-lsp-installer.lua +++ b/lua/nvim-lsp-installer.lua @@ -56,15 +56,6 @@ M.info_window = { end, } ----Deprecated. Use info_window.open(). -function M.display() - notify( - "The lsp_installer.display() function has been deprecated. Use lsp_installer.info_window.open() instead.", - vim.log.levels.WARN - ) - status_win().open() -end - function M.get_install_completion() local result = {} local server_names = servers.get_available_server_names() @@ -271,6 +262,10 @@ end ---@deprecated Setup servers directly via lspconfig instead. See https://github.com/williamboman/nvim-lsp-installer/discussions/636 ---@param cb fun(server: Server) @Callback to be executed whenever a server is ready to be set up. function M.on_server_ready(cb) + notify( + ".on_server_ready() has been deprecated. Set up servers directly via lspconfig instead. See https://github.com/williamboman/nvim-lsp-installer/discussions/636", + vim.log.levels.WARN + ) dispatcher.register_server_ready_callback(cb) vim.schedule(function() local installed_servers = servers.get_installed_servers() diff --git a/lua/nvim-lsp-installer/installers/cargo.lua b/lua/nvim-lsp-installer/installers/cargo.lua deleted file mode 100644 index 0413b637..00000000 --- a/lua/nvim-lsp-installer/installers/cargo.lua +++ /dev/null @@ -1,69 +0,0 @@ -require "nvim-lsp-installer.notify"( - ( - "%s has been deprecated. See https://github.com/williamboman/nvim-lsp-installer/wiki/Async-infrastructure-changes-notice" - ):format "nvim-lsp-installer.installers.cargo", - vim.log.levels.WARN -) - -local process = require "nvim-lsp-installer.process" -local path = require "nvim-lsp-installer.path" - -local M = {} - ----@param crate string The crate to install. ----@param opts {git:boolean, features:string|nil} -function M.crate(crate, opts) - ---@type ServerInstallerFunction - return function(_, callback, ctx) - opts = opts or {} - local args = { "install", "--root", ".", "--locked" } - - if ctx.requested_server_version then - vim.list_extend(args, { "--version", ctx.requested_server_version }) - end - - if opts.features then - vim.list_extend(args, { "--features", opts.features }) - end - - if opts.git then - vim.list_extend(args, { "--git", crate }) - else - vim.list_extend(args, { crate }) - end - - ctx.receipt:with_primary_source(ctx.receipt.cargo(crate)) - - process.spawn("cargo", { - args = args, - cwd = ctx.install_dir, - stdio_sink = ctx.stdio_sink, - }, callback) - end -end - ----@param opts {path:string|nil} -function M.install(opts) - ---@type ServerInstallerFunction - return function(_, callback, ctx) - opts = opts or {} - local args = { "install", "--root", "." } - if opts.path then - vim.list_extend(args, { "--path", opts.path }) - end - process.spawn("cargo", { - args = args, - cwd = ctx.install_dir, - stdio_sink = ctx.stdio_sink, - }, callback) - end -end - ----@param root_dir string The directory to resolve the executable from. -function M.env(root_dir) - return { - PATH = process.extend_path { path.concat { root_dir, "bin" } }, - } -end - -return M diff --git a/lua/nvim-lsp-installer/installers/composer.lua b/lua/nvim-lsp-installer/installers/composer.lua deleted file mode 100644 index 6d60e0b1..00000000 --- a/lua/nvim-lsp-installer/installers/composer.lua +++ /dev/null @@ -1,90 +0,0 @@ -require "nvim-lsp-installer.notify"( - ( - "%s has been deprecated. See https://github.com/williamboman/nvim-lsp-installer/wiki/Async-infrastructure-changes-notice" - ):format "nvim-lsp-installer.installers.composer", - vim.log.levels.WARN -) - -local installers = require "nvim-lsp-installer.installers" -local std = require "nvim-lsp-installer.installers.std" -local platform = require "nvim-lsp-installer.platform" -local process = require "nvim-lsp-installer.process" -local fs = require "nvim-lsp-installer.fs" -local path = require "nvim-lsp-installer.path" -local Data = require "nvim-lsp-installer.data" - -local list_copy = Data.list_copy - -local M = {} - -M.composer_cmd = platform.is_win and "composer.bat" or "composer" - ----@param installer ServerInstallerFunction -local function ensure_composer(installer) - return installers.pipe { - std.ensure_executables { - { "php", "php was not found in path. Refer to https://www.php.net/." }, - { M.composer_cmd, "composer was not found in path. Refer to https://getcomposer.org/download/." }, - }, - installer, - } -end - ----@param packages string[] The composer packages to install. The first item in this list will be the recipient of the server version, should the user request a specific one. -function M.require(packages) - return ensure_composer( - ---@type ServerInstallerFunction - function(_, callback, ctx) - local pkgs = list_copy(packages) - local c = process.chain { - cwd = ctx.install_dir, - stdio_sink = ctx.stdio_sink, - } - - ctx.receipt:with_primary_source(ctx.receipt.composer(pkgs[1])) - for i = 2, #pkgs do - ctx.receipt:with_secondary_source(ctx.receipt.composer(pkgs[i])) - end - - if not (fs.file_exists(path.concat { ctx.install_dir, "composer.json" })) then - c.run(M.composer_cmd, { "init", "--no-interaction", "--stability=stable" }) - end - - if ctx.requested_server_version then - -- The "head" package is the recipient for the requested version. It's.. by design... don't ask. - pkgs[1] = ("%s:%s"):format(pkgs[1], ctx.requested_server_version) - end - - c.run(M.composer_cmd, vim.list_extend({ "require" }, pkgs)) - c.spawn(callback) - end - ) -end - -function M.install() - return ensure_composer( - ---@type ServerInstallerFunction - function(_, callback, ctx) - process.spawn(M.composer_cmd, { - args = { - "install", - "--no-interaction", - "--no-dev", - "--optimize-autoloader", - "--classmap-authoritative", - }, - cwd = ctx.install_dir, - stdio_sink = ctx.stdio_sink, - }, callback) - end - ) -end - ----@param root_dir string The directory to resolve the executable from. -function M.env(root_dir) - return { - PATH = process.extend_path { path.concat { root_dir, "vendor", "bin" } }, - } -end - -return M diff --git a/lua/nvim-lsp-installer/installers/context.lua b/lua/nvim-lsp-installer/installers/context.lua deleted file mode 100644 index 14789959..00000000 --- a/lua/nvim-lsp-installer/installers/context.lua +++ /dev/null @@ -1,285 +0,0 @@ -require "nvim-lsp-installer.notify"( - ( - "%s has been deprecated. See https://github.com/williamboman/nvim-lsp-installer/wiki/Async-infrastructure-changes-notice" - ):format "nvim-lsp-installer.installers.context", - vim.log.levels.WARN -) - -local a = require "nvim-lsp-installer.core.async" -local log = require "nvim-lsp-installer.log" -local process = require "nvim-lsp-installer.process" -local installers = require "nvim-lsp-installer.installers" -local platform = require "nvim-lsp-installer.platform" -local fs = require "nvim-lsp-installer.fs" -local path = require "nvim-lsp-installer.path" -local github_client = require "nvim-lsp-installer.core.managers.github.client" - -local M = {} - ----@param repo string @The GitHub repo ("username/repo"). -function M.use_github_latest_tag(repo) - ---@type ServerInstallerFunction - return function(_, callback, context) - context.github_repo = repo - if context.requested_server_version then - log.fmt_debug( - "Requested server version already provided (%s), skipping fetching tags from GitHub.", - context.requested_server_version - ) - -- User has already provided a version - don't fetch the tags from GitHub - return callback(true) - end - context.stdio_sink.stdout "Fetching tags from GitHub API...\n" - a.run(github_client.fetch_latest_tag, function(success, result) - if not success then - context.stdio_sink.stderr(tostring(result) .. "\n") - return callback(false) - end - result - :on_success(function(latest_tag) - context.requested_server_version = latest_tag.name - callback(true) - end) - :on_failure(function(failure) - context.stdio_sink.stderr(tostring(failure) .. "\n") - callback(false) - end) - end, repo) - end -end - ----@param repo string @The GitHub repo ("username/repo"). ----@param opts FetchLatestGithubReleaseOpts|nil -function M.use_github_release(repo, opts) - opts = opts or {} - ---@type ServerInstallerFunction - return function(_, callback, context) - context.github_repo = repo - if context.requested_server_version then - log.fmt_debug( - "Requested server version already provided (%s), skipping fetching latest release from GitHub.", - context.requested_server_version - ) - -- User has already provided a version - don't fetch the latest version from GitHub - return callback(true) - end - context.stdio_sink.stdout "Fetching latest release version from GitHub API...\n" - a.run(github_client.fetch_latest_release, function(success, result) - if not success then - context.stdio_sink.stderr(tostring(result) .. "\n") - return callback(false) - end - result - :on_success(function(latest_release) - context.requested_server_version = latest_release.tag_name - callback(true) - end) - :on_failure(function(failure) - context.stdio_sink.stderr(tostring(failure) .. "\n") - callback(false) - end) - end, repo, opts) - end -end - ----@param repo string @The GitHub report ("username/repo"). ----@param file string|fun(resolved_version: string): string @The name of a file available in the provided repo's GitHub releases. ----@param opts FetchLatestGithubReleaseOpts -function M.use_github_release_file(repo, file, opts) - return installers.pipe { - M.use_github_release(repo, opts), - function(server, callback, context) - local function get_download_url(version) - local target_file - if type(file) == "function" then - target_file = file(version) - else - target_file = file - end - if not target_file then - log.fmt_error( - "Unable to find which release file to download. server_name=%s, repo=%s", - server.name, - repo - ) - context.stdio_sink.stderr( - ( - "Could not find which release file to download. Most likely the current operating system, architecture (%s), or libc (%s) is not supported.\n" - ):format(platform.arch, platform.get_libc()) - ) - return nil - end - - return ("https://github.com/%s/releases/download/%s/%s"):format(repo, version, target_file) - end - - local download_url = get_download_url(context.requested_server_version) - if not download_url then - return callback(false) - end - context.github_release_file = download_url - callback(true) - end, - } -end - ----Creates an installer that moves the current installation directory to the server's root directory. -function M.promote_install_dir() - ---@type ServerInstallerFunction - return vim.schedule_wrap(function(server, callback, context) - if server:promote_install_dir(context.install_dir) then - context.install_dir = server.root_dir - callback(true) - else - context.stdio_sink.stderr( - ("Failed to promote temporary install directory to %s.\n"):format(server.root_dir) - ) - callback(false) - end - end) -end - ----Access the context ojbect to create a new installer. ----@param fn fun(context: ServerInstallContext): ServerInstallerFunction -function M.capture(fn) - ---@type ServerInstallerFunction - return function(server, callback, context) - local installer = fn(context) - installer(server, callback, context) - end -end - ----@param fn fun(receipt_builder: InstallReceiptBuilder, ctx: ServerInstallContext) -function M.receipt(fn) - return M.capture(function(ctx) - fn(ctx.receipt, ctx) - return installers.noop - end) -end - ----Update the context object. ----@param fn fun(context: ServerInstallContext): ServerInstallerFunction -function M.set(fn) - ---@type ServerInstallerFunction - return function(_, callback, context) - fn(context) - callback(true) - end -end - ----@param rel_path string @The relative path from the current installation working directory. -function M.set_working_dir(rel_path) - ---@type ServerInstallerFunction - return vim.schedule_wrap(function(server, callback, context) - local new_dir = path.concat { context.install_dir, rel_path } - log.fmt_debug( - "Changing installation working directory for %s from %s to %s", - server.name, - context.install_dir, - new_dir - ) - if not fs.dir_exists(new_dir) then - local ok = pcall(fs.mkdirp, new_dir) - if not ok then - context.stdio_sink.stderr(("Failed to create directory %s.\n"):format(new_dir)) - return callback(false) - end - end - context.install_dir = new_dir - callback(true) - end) -end - -function M.use_os_distribution() - ---Parses the provided contents of an /etc/\*-release file and identifies the Linux distribution. - ---@param contents string @The contents of a /etc/\*-release file. - ---@return table<string, any> - local function parse_linux_dist(contents) - local lines = vim.split(contents, "\n") - - local entries = {} - - for i = 1, #lines do - local line = lines[i] - local index = line:find "=" - if index then - local key = line:sub(1, index - 1) - local value = line:sub(index + 1) - entries[key] = value - end - end - - if entries.ID == "ubuntu" then - -- Parses the Ubuntu OS VERSION_ID into their version components, e.g. "18.04" -> {major=18, minor=04} - local version_id = entries.VERSION_ID:gsub([["]], "") - local version_parts = vim.split(version_id, "%.") - local major = tonumber(version_parts[1]) - local minor = tonumber(version_parts[2]) - - return { - id = "ubuntu", - version_id = version_id, - version = { major = major, minor = minor }, - } - else - return { - id = "linux-generic", - } - end - end - - return installers.when { - ---@type ServerInstallerFunction - linux = function(_, callback, ctx) - local stdio = process.in_memory_sink() - process.spawn("bash", { - args = { "-c", "cat /etc/*-release" }, - stdio_sink = stdio.sink, - }, function(success) - if success then - ctx.os_distribution = parse_linux_dist(table.concat(stdio.buffers.stdout, "")) - callback(true) - else - ctx.os_distribution = { - id = "linux-generic", - } - callback(true) - end - end) - end, - mac = function(_, callback, ctx) - ctx.os_distribution = { - id = "macOS", - } - callback(true) - end, - win = function(_, callback, ctx) - ctx.os_distribution = { - id = "windows", - } - callback(true) - end, - } -end - -function M.use_homebrew_prefix() - return installers.on { - mac = function(_, callback, ctx) - local stdio = process.in_memory_sink() - process.spawn("brew", { - args = { "--prefix" }, - stdio_sink = stdio.sink, - }, function(success) - if success then - ctx.homebrew_prefix = vim.trim(table.concat(stdio.buffers.stdout, "")) - callback(true) - else - ctx.stdio_sink.stderr "Failed to locate Homebrew installation.\n" - callback(false) - end - end) - end, - } -end - -return M diff --git a/lua/nvim-lsp-installer/installers/dotnet.lua b/lua/nvim-lsp-installer/installers/dotnet.lua deleted file mode 100644 index 2c09aed4..00000000 --- a/lua/nvim-lsp-installer/installers/dotnet.lua +++ /dev/null @@ -1,58 +0,0 @@ -require "nvim-lsp-installer.notify"( - ( - "%s has been deprecated. See https://github.com/williamboman/nvim-lsp-installer/wiki/Async-infrastructure-changes-notice" - ):format "nvim-lsp-installer.installers.dotnet", - vim.log.levels.WARN -) - -local installers = require "nvim-lsp-installer.installers" -local std = require "nvim-lsp-installer.installers.std" -local process = require "nvim-lsp-installer.process" - -local M = {} - ----@param installer ServerInstallerFunction -local function ensure_dotnet(installer) - return installers.pipe { - std.ensure_executables { - { - "dotnet", - "dotnet was not found in path. Refer to https://dotnet.microsoft.com/download for installation instructions.", - }, - }, - installer, - } -end - ----@param package string -function M.package(package) - return ensure_dotnet( - ---@type ServerInstallerFunction - function(_, callback, ctx) - local args = { - "tool", - "update", - "--tool-path", - ".", - } - if ctx.requested_server_version then - vim.list_extend(args, { "--version", ctx.requested_server_version }) - end - vim.list_extend(args, { package }) - process.spawn("dotnet", { - args = args, - cwd = ctx.install_dir, - stdio_sink = ctx.stdio_sink, - }, callback) - ctx.receipt:with_primary_source(ctx.receipt.dotnet(package)) - end - ) -end - -function M.env(root_dir) - return { - PATH = process.extend_path { root_dir }, - } -end - -return M diff --git a/lua/nvim-lsp-installer/installers/gem.lua b/lua/nvim-lsp-installer/installers/gem.lua deleted file mode 100644 index c8d03298..00000000 --- a/lua/nvim-lsp-installer/installers/gem.lua +++ /dev/null @@ -1,65 +0,0 @@ -require "nvim-lsp-installer.notify"( - ( - "%s has been deprecated. See https://github.com/williamboman/nvim-lsp-installer/wiki/Async-infrastructure-changes-notice" - ):format "nvim-lsp-installer.installers.gem", - vim.log.levels.WARN -) - -local path = require "nvim-lsp-installer.path" -local Data = require "nvim-lsp-installer.data" -local process = require "nvim-lsp-installer.process" -local installers = require "nvim-lsp-installer.installers" -local std = require "nvim-lsp-installer.installers.std" -local platform = require "nvim-lsp-installer.platform" - -local M = {} - -M.gem_cmd = platform.is_win and "gem.cmd" or "gem" - ----@param packages string[] @The Gem packages to install. The first item in this list will be the recipient of the server version, should the user request a specific one. -function M.packages(packages) - return installers.pipe { - std.ensure_executables { - { "ruby", "ruby was not found in path, refer to https://wiki.openstack.org/wiki/RubyGems." }, - { "gem", "gem was not found in path, refer to https://wiki.openstack.org/wiki/RubyGems." }, - }, - ---@type ServerInstallerFunction - function(_, callback, ctx) - local pkgs = Data.list_copy(packages or {}) - - ctx.receipt:with_primary_source(ctx.receipt.gem(pkgs[1])) - for i = 2, #pkgs do - ctx.receipt:with_secondary_source(ctx.receipt.gem(pkgs[i])) - end - - if ctx.requested_server_version then - -- The "head" package is the recipient for the requested version. It's.. by design... don't ask. - pkgs[1] = ("%s:%s"):format(pkgs[1], ctx.requested_server_version) - end - - process.spawn(M.gem_cmd, { - args = { - "install", - "--no-user-install", - "--install-dir=.", - "--bindir=bin", - "--no-document", - table.concat(pkgs, " "), - }, - cwd = ctx.install_dir, - stdio_sink = ctx.stdio_sink, - }, callback) - end, - } -end - ----@param root_dir string -function M.env(root_dir) - return { - GEM_HOME = root_dir, - GEM_PATH = root_dir, - PATH = process.extend_path { path.concat { root_dir, "bin" } }, - } -end - -return M diff --git a/lua/nvim-lsp-installer/installers/go.lua b/lua/nvim-lsp-installer/installers/go.lua deleted file mode 100644 index 89d09f5f..00000000 --- a/lua/nvim-lsp-installer/installers/go.lua +++ /dev/null @@ -1,54 +0,0 @@ -require "nvim-lsp-installer.notify"( - ( - "%s has been deprecated. See https://github.com/williamboman/nvim-lsp-installer/wiki/Async-infrastructure-changes-notice" - ):format "nvim-lsp-installer.installers.go", - vim.log.levels.WARN -) - -local std = require "nvim-lsp-installer.installers.std" -local installers = require "nvim-lsp-installer.installers" -local process = require "nvim-lsp-installer.process" - -local M = {} - ----@param packages string[] The Go packages to install. The first item in this list will be the recipient of the server version, should the user request a specific one. -function M.packages(packages) - return installers.pipe { - std.ensure_executables { { "go", "go was not found in path, refer to https://golang.org/doc/install." } }, - ---@type ServerInstallerFunction - function(_, callback, ctx) - local c = process.chain { - env = process.graft_env { - GOBIN = ctx.install_dir, - }, - cwd = ctx.install_dir, - stdio_sink = ctx.stdio_sink, - } - - -- Install the head package - do - local head_package = packages[1] - ctx.receipt:with_primary_source(ctx.receipt.go(head_package)) - local version = ctx.requested_server_version or "latest" - c.run("go", { "install", "-v", ("%s@%s"):format(head_package, version) }) - end - - -- Install secondary packages - for i = 2, #packages do - local package = packages[i] - ctx.receipt:with_secondary_source(ctx.receipt.go(package)) - c.run("go", { "install", "-v", ("%s@latest"):format(package) }) - end - - c.spawn(callback) - end, - } -end - -function M.env(root_dir) - return { - PATH = process.extend_path { root_dir }, - } -end - -return M diff --git a/lua/nvim-lsp-installer/installers/init.lua b/lua/nvim-lsp-installer/installers/init.lua deleted file mode 100644 index cfe48faa..00000000 --- a/lua/nvim-lsp-installer/installers/init.lua +++ /dev/null @@ -1,186 +0,0 @@ -local platform = require "nvim-lsp-installer.platform" -local log = require "nvim-lsp-installer.log" -local Data = require "nvim-lsp-installer.data" - -local M = {} - ----@param installer ServerInstallerFunction[]|ServerInstallerFunction ----@return ServerInstallerFunction -local function normalize_installer(installer) - if type(installer) == "table" then - return M.pipe(installer) - else - return installer - end -end - ----@alias ServerInstallCallback fun(success: boolean) - ----@class ServerInstallContext ----@field receipt InstallReceiptBuilder ----@field requested_server_version string|nil @The version requested by the user. ----@field stdio_sink StdioSink ----@field github_release_file string|nil @Only available if context.use_github_release_file has been called. ----@field github_repo string|nil @Only available if context.use_github_release_file has been called. ----@field os_distribution table<string, any> @Only available if context.use_os_distribution has been called. ----@field homebrew_prefix string @Only available if context.use_homebrew_prefix has been called. ----@field install_dir string - ----@alias ServerInstallerFunction fun(server: Server, callback: ServerInstallCallback, context: ServerInstallContext) - ---- Composes multiple installer functions into one. ----@param installers ServerInstallerFunction[] ----@return ServerInstallerFunction -function M.pipe(installers) - if #installers == 0 then - error "No installers to pipe." - end - - return function(server, callback, context) - local function execute(idx) - local ok, err = pcall( - installers[idx], - server, - vim.schedule_wrap(function(success) - if not success then - -- oh no, error. exit early - callback(success) - elseif installers[idx + 1] then - -- iterate - execute(idx + 1) - else - -- we done - callback(success) - end - end), - context - ) - if not ok then - context.stdio_sink.stderr(tostring(err) .. "\n") - callback(false) - end - end - - execute(1) - end -end - ---- Composes multiple installer function into one - in reversed order. ----@param installers ServerInstallerFunction[] -function M.compose(installers) - return M.pipe(Data.list_reverse(installers)) -end - ----@param installers ServerInstallerFunction[] ----@return ServerInstallerFunction @An installer function that will serially execute the provided installers, until the first one succeeds. -function M.first_successful(installers) - if #installers == 0 then - error "No installers to pipe." - end - - return function(server, callback, context) - local function execute(idx) - log.fmt_trace("Executing installer idx=%d", idx) - local ok, err = pcall(installers[idx], server, function(success) - log.fmt_trace("Installer idx=%d on exit with success=%s", idx, success) - if not success and installers[idx + 1] then - -- iterate - execute(idx + 1) - else - callback(success) - end - end, context) - if not ok then - context.stdio_sink.stderr(tostring(err) .. "\n") - if installers[idx + 1] then - execute(idx + 1) - else - callback(false) - end - end - end - - execute(1) - end -end - ---- Wraps the provided server installer to always succeeds. ----@param installer ServerInstallerFunction ----@return ServerInstallerFunction -function M.always_succeed(installer) - return function(server, callback, context) - installer(server, function() - callback(true) - end, context) - end -end - ----@param platform_table table<Platform, ServerInstallerFunction> ----@return ServerInstallerFunction | ServerInstallerFunction[] | nil -local function get_by_platform(platform_table) - if platform.is_mac then - return platform_table.mac or platform_table.unix - elseif platform.is_linux then - return platform_table.linux or platform_table.unix - elseif platform.is_unix then - return platform_table.unix - elseif platform.is_win then - return platform_table.win - else - return nil - end -end - ---- Creates a server installer that executes the given installer for the current platform. ---- If there is no server installer provided for the current platform, the installer will instantly exit successfully. ----@param platform_table table<Platform, ServerInstallerFunction> ----@return ServerInstallerFunction -function M.on(platform_table) - return function(server, callback, context) - local installer = get_by_platform(platform_table) - if installer then - normalize_installer(installer)(server, callback, context) - else - callback(true) - end - end -end - ---- Creates a server installer that executes the given installer for the current platform. ---- If there is no server installer provided for the current platform, the installer will instantly exit with a failure. ----@param platform_table table<Platform, ServerInstallerFunction|ServerInstallerFunction[]> ----@return ServerInstallerFunction -function M.when(platform_table) - return function(server, callback, context) - local installer = get_by_platform(platform_table) - if installer then - normalize_installer(installer)(server, callback, context) - else - context.stdio_sink.stderr( - ("Current operating system is not yet supported for server %q.\n"):format(server.name) - ) - callback(false) - end - end -end - ----@param installer ServerInstallerFunction|ServerInstallerFunction[] @The installer to execute in a new installer context. -function M.branch_context(installer) - ---@type ServerInstallerFunction - return function(server, callback, ctx) - local receipt = ctx.receipt - -- This temporary nil assignment is done to avoid deepcopy traversing the receipt builder unnecessarily - ctx.receipt = nil - local new_context = vim.deepcopy(ctx) - ctx.receipt = receipt - new_context.receipt = receipt - normalize_installer(installer)(server, callback, new_context) - end -end - ----@type ServerInstallerFunction -function M.noop(_, callback) - callback(true) -end - -return M diff --git a/lua/nvim-lsp-installer/installers/npm.lua b/lua/nvim-lsp-installer/installers/npm.lua deleted file mode 100644 index e436b0be..00000000 --- a/lua/nvim-lsp-installer/installers/npm.lua +++ /dev/null @@ -1,131 +0,0 @@ -require "nvim-lsp-installer.notify"( - ( - "%s has been deprecated. See https://github.com/williamboman/nvim-lsp-installer/wiki/Async-infrastructure-changes-notice" - ):format "nvim-lsp-installer.installers.npm", - vim.log.levels.WARN -) - -local path = require "nvim-lsp-installer.path" -local fs = require "nvim-lsp-installer.fs" -local Data = require "nvim-lsp-installer.data" -local installers = require "nvim-lsp-installer.installers" -local std = require "nvim-lsp-installer.installers.std" -local platform = require "nvim-lsp-installer.platform" -local process = require "nvim-lsp-installer.process" - -local list_copy = Data.list_copy - -local M = {} - -M.npm_command = platform.is_win and "npm.cmd" or "npm" - ----@param installer ServerInstallerFunction -local function ensure_npm(installer) - return installers.pipe { - std.ensure_executables { - { "node", "node was not found in path. Refer to https://nodejs.org/en/." }, - { - "npm", - "npm was not found in path. Refer to https://docs.npmjs.com/downloading-and-installing-node-js-and-npm.", - }, - }, - installer, - } -end - ----@param standalone boolean @If true, will run `npm install` as a standalone command, with no consideration to the surrounding installer context (i.e. the requested version in context is ignored, global-style is not applied). -local function create_installer(standalone) - ---@param packages string[] - return function(packages) - return ensure_npm( - ---@type ServerInstallerFunction - function(_, callback, ctx) - local pkgs = list_copy(packages or {}) - local c = process.chain { - cwd = ctx.install_dir, - stdio_sink = ctx.stdio_sink, - } - - if not standalone then - -- Use global-style. The reasons for this are: - -- a) To avoid polluting the executables (aka bin-links) that npm creates. - -- b) The installation is, after all, more similar to a "global" installation. We don't really gain - -- any of the benefits of not using global style (e.g., deduping the dependency tree). - -- - -- We write to .npmrc manually instead of going through npm because managing a local .npmrc file - -- is a bit unreliable across npm versions (especially <7), so we take extra measures to avoid - -- inadvertently polluting global npm config. - fs.append_file(path.concat { ctx.install_dir, ".npmrc" }, "global-style=true") - - ctx.receipt:with_primary_source(ctx.receipt.npm(pkgs[1])) - for i = 2, #pkgs do - ctx.receipt:with_secondary_source(ctx.receipt.npm(pkgs[i])) - end - end - - -- stylua: ignore start - if not (fs.dir_exists(path.concat { ctx.install_dir, "node_modules" }) or - fs.file_exists(path.concat { ctx.install_dir, "package.json" })) - then - -- Create a package.json to set a boundary for where npm installs packages. - c.run(M.npm_command, { "init", "--yes", "--scope=lsp-installer" }) - end - - if not standalone and ctx.requested_server_version and #pkgs > 0 then - -- The "head" package is the recipient for the requested version. It's.. by design... don't ask. - pkgs[1] = ("%s@%s"):format(pkgs[1], ctx.requested_server_version) - end - - -- stylua: ignore end - c.run(M.npm_command, vim.list_extend({ "install" }, pkgs)) - c.spawn(callback) - end - ) - end -end - ----Creates an installer that installs the provided packages. Will respect user's requested version. -M.packages = create_installer(false) - ----Creates an installer that installs the provided packages. Will NOT respect user's requested version. ----This is useful in situation where there's a need to install an auxiliary npm package. -M.install = create_installer(true) - ----Creates a server installer that executes the given locally installed npm executable. ----@param executable string ----@param args string[] -function M.exec(executable, args) - ---@type ServerInstallerFunction - return function(_, callback, ctx) - process.spawn(executable, { - args = args, - cwd = ctx.install_dir, - stdio_sink = ctx.stdio_sink, - env = process.graft_env(M.env(ctx.install_dir)), - }, callback) - end -end - ----Creates a server installer that runs the given script. ----@param script string @The npm script to run (npm run). -function M.run(script) - return ensure_npm( - ---@type ServerInstallerFunction - function(_, callback, ctx) - process.spawn(M.npm_command, { - args = { "run", script }, - cwd = ctx.install_dir, - stdio_sink = ctx.stdio_sink, - }, callback) - end - ) -end - ----@param root_dir string @The directory to resolve the executable from. -function M.env(root_dir) - return { - PATH = process.extend_path { path.concat { root_dir, "node_modules", ".bin" } }, - } -end - -return M diff --git a/lua/nvim-lsp-installer/installers/opam.lua b/lua/nvim-lsp-installer/installers/opam.lua deleted file mode 100644 index 349810ce..00000000 --- a/lua/nvim-lsp-installer/installers/opam.lua +++ /dev/null @@ -1,60 +0,0 @@ -require "nvim-lsp-installer.notify"( - ( - "%s has been deprecated. See https://github.com/williamboman/nvim-lsp-installer/wiki/Async-infrastructure-changes-notice" - ):format "nvim-lsp-installer.installers.opam", - vim.log.levels.WARN -) - -local std = require "nvim-lsp-installer.installers.std" -local installers = require "nvim-lsp-installer.installers" -local process = require "nvim-lsp-installer.process" -local path = require "nvim-lsp-installer.path" -local Data = require "nvim-lsp-installer.data" - -local list_copy = Data.list_copy - -local M = {} - ----@param packages string[] The OPAM packages to install. The first item in this list will be the recipient of the server version, should the user request a specific one. -function M.packages(packages) - return installers.pipe { - std.ensure_executables { - { "opam", "opam was not found in path, refer to https://opam.ocaml.org/doc/Install.html" }, - }, - ---@type ServerInstallerFunction - function(_, callback, ctx) - local pkgs = list_copy(packages) - - ctx.receipt:with_primary_source(ctx.receipt.opam(pkgs[1])) - for i = 2, #pkgs do - ctx.receipt:with_secondary_source(ctx.receipt.opam(pkgs[i])) - end - - if ctx.requested_server_version then - pkgs[1] = ("%s.%s"):format(pkgs[1], ctx.requested_server_version) - end - - local install_args = { - "install", - ("--destdir=%s"):format(ctx.install_dir), - "--yes", - "--verbose", - } - vim.list_extend(install_args, pkgs) - - process.spawn("opam", { - args = install_args, - cwd = ctx.install_dir, - stdio_sink = ctx.stdio_sink, - }, callback) - end, - } -end - -function M.env(root_dir) - return { - PATH = process.extend_path { path.concat { root_dir, "bin" } }, - } -end - -return M diff --git a/lua/nvim-lsp-installer/installers/pip3.lua b/lua/nvim-lsp-installer/installers/pip3.lua deleted file mode 100644 index a7c8b13c..00000000 --- a/lua/nvim-lsp-installer/installers/pip3.lua +++ /dev/null @@ -1,91 +0,0 @@ -require "nvim-lsp-installer.notify"( - ( - "%s has been deprecated. See https://github.com/williamboman/nvim-lsp-installer/wiki/Async-infrastructure-changes-notice" - ):format "nvim-lsp-installer.installers.pip3", - vim.log.levels.WARN -) - -local path = require "nvim-lsp-installer.path" -local Data = require "nvim-lsp-installer.data" -local installers = require "nvim-lsp-installer.installers" -local std = require "nvim-lsp-installer.installers.std" -local platform = require "nvim-lsp-installer.platform" -local process = require "nvim-lsp-installer.process" -local settings = require "nvim-lsp-installer.settings" -local context = require "nvim-lsp-installer.installers.context" -local log = require "nvim-lsp-installer.log" - -local M = {} - -local REL_INSTALL_DIR = "venv" - ----@param python_executable string ----@param packages string[] -local function create_installer(python_executable, packages) - return installers.pipe { - std.ensure_executables { - { - python_executable, - ("%s was not found in path. Refer to https://www.python.org/downloads/."):format(python_executable), - }, - }, - ---@type ServerInstallerFunction - function(_, callback, ctx) - local pkgs = Data.list_copy(packages or {}) - local c = process.chain { - cwd = ctx.install_dir, - stdio_sink = ctx.stdio_sink, - env = process.graft_env(M.env(ctx.install_dir)), - } - - ctx.receipt:with_primary_source(ctx.receipt.pip3(pkgs[1])) - for i = 2, #pkgs do - ctx.receipt:with_secondary_source(ctx.receipt.pip3(pkgs[i])) - end - - c.run(python_executable, { "-m", "venv", REL_INSTALL_DIR }) - if ctx.requested_server_version then - -- The "head" package is the recipient for the requested version. It's.. by design... don't ask. - pkgs[1] = ("%s==%s"):format(pkgs[1], ctx.requested_server_version) - end - - local install_command = { "-m", "pip", "install", "-U" } - vim.list_extend(install_command, settings.current.pip.install_args) - c.run("python", vim.list_extend(install_command, pkgs)) - - c.spawn(callback) - end, - } -end - ----@param packages string[] @The pip packages to install. The first item in this list will be the recipient of the server version, should the user request a specific one. -function M.packages(packages) - local py3 = create_installer("python3", packages) - local py = create_installer("python", packages) - -- see https://github.com/williamboman/nvim-lsp-installer/issues/128 - local installer_variants = platform.is_win and { py, py3 } or { py3, py } - - local py3_host_prog = vim.g.python3_host_prog - if py3_host_prog then - log.fmt_trace("Found python3_host_prog (%s)", py3_host_prog) - table.insert(installer_variants, 1, create_installer(py3_host_prog, packages)) - end - - return installers.pipe { - context.promote_install_dir(), - installers.first_successful(installer_variants), - } -end - ----@param root_dir string @The directory to resolve the executable from. -function M.env(root_dir) - return { - PATH = process.extend_path { M.path(root_dir) }, - } -end - -function M.path(root_dir) - return path.concat { root_dir, REL_INSTALL_DIR, platform.is_win and "Scripts" or "bin" } -end - -return M diff --git a/lua/nvim-lsp-installer/installers/shell.lua b/lua/nvim-lsp-installer/installers/shell.lua deleted file mode 100644 index 2cc8a845..00000000 --- a/lua/nvim-lsp-installer/installers/shell.lua +++ /dev/null @@ -1,117 +0,0 @@ -require "nvim-lsp-installer.notify"( - ( - "%s has been deprecated. See https://github.com/williamboman/nvim-lsp-installer/wiki/Async-infrastructure-changes-notice" - ):format "nvim-lsp-installer.installers.shell", - vim.log.levels.WARN -) - -local installers = require "nvim-lsp-installer.installers" -local process = require "nvim-lsp-installer.process" - -local M = {} - ----@param opts {shell: string, cmd: string[], env: table|nil} -local function shell(opts) - ---@type ServerInstallerFunction - return function(_, callback, context) - local _, stdio = process.spawn(opts.shell, { - args = opts.args, - cwd = context.install_dir, - stdio_sink = context.stdio_sink, - env = process.graft_env(opts.env or {}, { - "PSMODULEPATH", -- https://github.com/williamboman/nvim-lsp-installer/issues/271 - }), - }, callback) - - if stdio and opts.cmd then - local stdin = stdio[1] - - stdin:write(opts.cmd) - stdin:write "\n" - stdin:close() - end - end -end - ----@param raw_script string @The bash script to execute as-is. ----@param opts {prefix: string, env: table} -function M.bash(raw_script, opts) - local default_opts = { - prefix = "set -euo pipefail;", - env = {}, - } - opts = vim.tbl_deep_extend("force", default_opts, opts or {}) - - return shell { - shell = "bash", - args = { "-c", (opts.prefix or "") .. raw_script }, - env = opts.env, - } -end - ----@param raw_script string @The sh script to execute as-is. ----@param opts {prefix: string, env: table} -function M.sh(raw_script, opts) - local default_opts = { - prefix = "set -eu;", - env = {}, - } - opts = vim.tbl_deep_extend("force", default_opts, opts or {}) - - return shell { - shell = "sh", - cmd = (opts.prefix or "") .. raw_script, - env = opts.env, - } -end - ----@param raw_script string @The cmd.exe script to execute as-is. ----@param opts {env: table} -function M.cmd(raw_script, opts) - local default_opts = { - env = {}, - } - opts = vim.tbl_deep_extend("force", default_opts, opts or {}) - - return shell { - shell = "cmd.exe", - args = { "/C", raw_script }, - env = opts.env, - } -end - ----@param raw_script string @The powershell script to execute as-is. ----@param opts {prefix: string, env: table} -function M.powershell(raw_script, opts) - local default_opts = { - env = {}, - -- YIKES https://stackoverflow.com/a/63301751 - prefix = [[ - $ProgressPreference = 'SilentlyContinue'; - [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; - ]], - } - opts = vim.tbl_deep_extend("force", default_opts, opts or {}) - - return shell { - shell = "powershell.exe", - args = { "-NoProfile", "-Command", (opts.prefix or "") .. raw_script }, - env = opts.env, - } -end - ----@param raw_script string @A script that is compatible with bash and cmd.exe. ----@param opts {env: table} -function M.polyshell(raw_script, opts) - local default_opts = { - env = {}, - } - opts = vim.tbl_deep_extend("force", default_opts, opts or {}) - - return installers.when { - unix = M.bash(raw_script, { env = opts.env }), - win = M.cmd(raw_script, { env = opts.env }), - } -end - -return M diff --git a/lua/nvim-lsp-installer/installers/std.lua b/lua/nvim-lsp-installer/installers/std.lua deleted file mode 100644 index 9db1251c..00000000 --- a/lua/nvim-lsp-installer/installers/std.lua +++ /dev/null @@ -1,344 +0,0 @@ -require "nvim-lsp-installer.notify"( - ( - "%s has been deprecated. See https://github.com/williamboman/nvim-lsp-installer/wiki/Async-infrastructure-changes-notice" - ):format "nvim-lsp-installer.installers.std", - vim.log.levels.WARN -) - -local path = require "nvim-lsp-installer.path" -local fs = require "nvim-lsp-installer.fs" -local process = require "nvim-lsp-installer.process" -local platform = require "nvim-lsp-installer.platform" -local installers = require "nvim-lsp-installer.installers" -local shell = require "nvim-lsp-installer.installers.shell" -local Data = require "nvim-lsp-installer.data" - -local list_not_nil, when = Data.list_not_nil, Data.when - -local USER_AGENT = "nvim-lsp-installer (+https://github.com/williamboman/nvim-lsp-installer)" - -local M = {} - ----@param url string @The url to download. ----@param out_file string @The relative path to where to write the contents of the url. -function M.download_file(url, out_file) - return installers.when { - ---@type ServerInstallerFunction - unix = function(_, callback, context) - context.stdio_sink.stdout(("Downloading file %q...\n"):format(url)) - process.attempt { - jobs = { - process.lazy_spawn("wget", { - args = { "--header", ("User-Agent: %s"):format(USER_AGENT), "-nv", "-O", out_file, url }, - cwd = context.install_dir, - stdio_sink = context.stdio_sink, - }), - process.lazy_spawn("curl", { - args = { "-H", ("User-Agent: %s"):format(USER_AGENT), "-fsSL", "-o", out_file, url }, - cwd = context.install_dir, - stdio_sink = context.stdio_sink, - }), - }, - on_finish = callback, - } - end, - win = shell.powershell( - ("iwr -Headers @{'User-Agent' = '%s'} -UseBasicParsing -Uri %q -OutFile %q"):format( - USER_AGENT, - url, - out_file - ) - ), - } -end - ----@param file string @The relative path to the file to unzip. ----@param dest string|nil @The destination of the unzip. -function M.unzip(file, dest) - return installers.pipe { - installers.when { - ---@type ServerInstallerFunction - unix = function(_, callback, context) - process.spawn("unzip", { - args = { "-d", dest, file }, - cwd = context.install_dir, - stdio_sink = context.stdio_sink, - }, callback) - end, - win = shell.powershell( - ("Microsoft.PowerShell.Archive\\Expand-Archive -Path %q -DestinationPath %q"):format(file, dest) - ), - }, - installers.always_succeed(M.rmrf(file)), - } -end - ----@see unzip(). ----@param url string @The url of the .zip file. ----@param dest string|nil @The url of the .zip file. Defaults to ".". -function M.unzip_remote(url, dest) - return installers.pipe { - M.download_file(url, "archive.zip"), - M.unzip("archive.zip", dest or "."), - } -end - ----@param file string @The relative path to the tar file to extract. -function M.untar(file) - return installers.pipe { - ---@type ServerInstallerFunction - function(_, callback, context) - process.spawn("tar", { - args = { "-xvf", file }, - cwd = context.install_dir, - stdio_sink = context.stdio_sink, - }, callback) - end, - installers.always_succeed(M.rmrf(file)), - } -end - ----@param file string -local function win_extract(file) - return installers.pipe { - ---@type ServerInstallerFunction - function(_, callback, context) - -- The trademarked "throw shit until it sticks" technique - local sevenzip = process.lazy_spawn("7z", { - args = { "x", "-y", "-r", file }, - cwd = context.install_dir, - stdio_sink = context.stdio_sink, - }) - local peazip = process.lazy_spawn("peazip", { - args = { "-ext2here", path.concat { context.install_dir, file } }, -- peazip require absolute paths, or else! - cwd = context.install_dir, - stdio_sink = context.stdio_sink, - }) - local winzip = process.lazy_spawn("wzunzip", { - args = { file }, - cwd = context.install_dir, - stdio_sink = context.stdio_sink, - }) - local winrar = process.lazy_spawn("winrar", { - args = { "e", file }, - cwd = context.install_dir, - stdio_sink = context.stdio_sink, - }) - process.attempt { - jobs = { sevenzip, peazip, winzip, winrar }, - on_finish = callback, - } - end, - installers.always_succeed(M.rmrf(file)), - } -end - ----@param file string -local function win_untarxz(file) - return installers.pipe { - win_extract(file), - M.untar(file:gsub(".xz$", "")), - } -end - ----@param file string -local function win_arc_unarchive(file) - return installers.pipe { - ---@type ServerInstallerFunction - function(_, callback, context) - context.stdio_sink.stdout "Attempting to unarchive using arc." - process.spawn("arc", { - args = { "unarchive", file }, - cwd = context.install_dir, - stdio_sink = context.stdio_sink, - }, callback) - end, - installers.always_succeed(M.rmrf(file)), - } -end - ----@param url string @The url to the .tar.xz file to extract. -function M.untarxz_remote(url) - return installers.pipe { - M.download_file(url, "archive.tar.xz"), - installers.when { - unix = M.untar "archive.tar.xz", - win = installers.first_successful { - win_untarxz "archive.tar.xz", - win_arc_unarchive "archive.tar.xz", - }, - }, - } -end - ----@param url string @The url to the .tar.gz file to extract. -function M.untargz_remote(url) - return installers.pipe { - M.download_file(url, "archive.tar.gz"), - M.untar "archive.tar.gz", - } -end - ----@param file string @The relative path to the file to gunzip. -function M.gunzip(file) - return installers.when { - ---@type ServerInstallerFunction - unix = function(_, callback, context) - process.spawn("gzip", { - args = { "-d", file }, - cwd = context.install_dir, - stdio_sink = context.stdio_sink, - }, callback) - end, - win = win_extract(file), - } -end - ----@see gunzip() ----@param url string @The url to the .gz file to extract. ----@param out_file string|nil @The name of the extracted .gz file. -function M.gunzip_remote(url, out_file) - local archive = ("%s.gz"):format(out_file or "archive") - return installers.pipe { - M.download_file(url, archive), - M.gunzip(archive), - installers.always_succeed(M.rmrf(archive)), - } -end - ----Recursively deletes the provided path. Will fail on paths that are not inside the configured install_root_dir. ----@param rel_path string @The relative path to the file/directory to remove. -function M.rmrf(rel_path) - ---@type ServerInstallerFunction - return function(_, callback, context) - local abs_path = path.concat { context.install_dir, rel_path } - context.stdio_sink.stdout(("Deleting %q\n"):format(abs_path)) - vim.schedule(function() - local ok = pcall(fs.rmrf, abs_path) - if ok then - callback(true) - else - context.stdio_sink.stderr(("Failed to delete %q.\n"):format(abs_path)) - callback(false) - end - end) - end -end - ----@param rel_path string @The relative path to the file to write. ----@param contents string @The file contents. -function M.write_file(rel_path, contents) - ---@type ServerInstallerFunction - return function(_, callback, ctx) - local file = path.concat { ctx.install_dir, rel_path } - ctx.stdio_sink.stdout(("Writing file %q\n"):format(file)) - fs.write_file(file, contents) - callback(true) - end -end - ----Shallow git clone. ----@param repo_url string ----@param opts {directory: string, recursive: boolean} -function M.git_clone(repo_url, opts) - ---@type ServerInstallerFunction - return function(_, callback, context) - opts = vim.tbl_deep_extend("force", { - directory = ".", - recursive = false, - }, opts or {}) - - local c = process.chain { - cwd = context.install_dir, - stdio_sink = context.stdio_sink, - } - - c.run( - "git", - list_not_nil( - "clone", - "--depth", - "1", - when(opts.recursive, "--recursive"), - when(opts.recursive, "--shallow-submodules"), - repo_url, - opts.directory - ) - ) - - if context.requested_server_version then - c.run("git", { "-C", opts.directory, "fetch", "--depth", "1", "origin", context.requested_server_version }) - c.run("git", { "-C", opts.directory, "checkout", "FETCH_HEAD" }) - end - - c.spawn(callback) - end -end - ----@param opts {args: string[]} -function M.gradlew(opts) - ---@type ServerInstallerFunction - return function(_, callback, context) - process.spawn(path.concat { context.install_dir, platform.is_win and "gradlew.bat" or "gradlew" }, { - args = opts.args, - cwd = context.install_dir, - stdio_sink = context.stdio_sink, - }, callback) - end -end - ----Creates an installer that ensures that the provided executables are available in the current runtime. ----@param executables string[][] @A list of (executable, error_msg) tuples. ----@return ServerInstallerFunction -function M.ensure_executables(executables) - return vim.schedule_wrap( - ---@type ServerInstallerFunction - function(_, callback, context) - local has_error = false - for i = 1, #executables do - local entry = executables[i] - local executable = entry[1] - local error_msg = entry[2] - if vim.fn.executable(executable) ~= 1 then - has_error = true - context.stdio_sink.stderr(error_msg .. "\n") - end - end - callback(not has_error) - end - ) -end - ----@path old_path string @The relative path to the file/dir to rename. ----@path new_path string @The relative path to what to rename the file/dir to. -function M.rename(old_path, new_path) - ---@type ServerInstallerFunction - return function(_, callback, context) - local ok = pcall( - fs.rename, - path.concat { context.install_dir, old_path }, - path.concat { context.install_dir, new_path } - ) - if not ok then - context.stdio_sink.stderr(("Failed to rename %q to %q.\n"):format(old_path, new_path)) - end - callback(ok) - end -end - ----@param flags string @The chmod flag to apply. ----@param files string[] @A list of relative paths to apply the chmod on. -function M.chmod(flags, files) - return installers.on { - ---@type ServerInstallerFunction - unix = function(_, callback, context) - process.spawn("chmod", { - args = vim.list_extend({ flags }, files), - cwd = context.install_dir, - stdio_sink = context.stdio_sink, - }, callback) - end, - } -end - -return M diff --git a/lua/nvim-lsp-installer/server.lua b/lua/nvim-lsp-installer/server.lua index 66d9655f..5224cd7e 100644 --- a/lua/nvim-lsp-installer/server.lua +++ b/lua/nvim-lsp-installer/server.lua @@ -1,11 +1,11 @@ local dispatcher = require "nvim-lsp-installer.dispatcher" +local notify = require "nvim-lsp-installer.notify" local a = require "nvim-lsp-installer.core.async" local InstallContext = require "nvim-lsp-installer.core.installer.context" local fs = require "nvim-lsp-installer.fs" local log = require "nvim-lsp-installer.log" local platform = require "nvim-lsp-installer.platform" local settings = require "nvim-lsp-installer.settings" -local installers = require "nvim-lsp-installer.installers" local installer = require "nvim-lsp-installer.core.installer" local servers = require "nvim-lsp-installer.servers" local status_win = require "nvim-lsp-installer.ui.status-win" @@ -19,7 +19,7 @@ local M = {} M.get_server_root_path = servers.get_server_install_path ---@alias ServerDeprecation {message:string, replace_with:string|nil} ----@alias ServerOpts {name:string, root_dir:string, homepage:string|nil, deprecated:ServerDeprecation, installer:ServerInstallerFunction|ServerInstallerFunction[], default_options:table, languages: string[]} +---@alias ServerOpts {name:string, root_dir:string, homepage:string|nil, deprecated:ServerDeprecation, installer:async fun(ctx: InstallContext), default_options:table, languages: string[]} ---@class Server ---@field public name string @The server name. This is the same as lspconfig's server names. @@ -27,8 +27,7 @@ M.get_server_root_path = servers.get_server_install_path ---@field public homepage string|nil @The homepage where users can find more information. This is shown to users in the UI. ---@field public deprecated ServerDeprecation|nil @The existence (not nil) of this field indicates this server is depracted. ---@field public languages string[] ----@field private _installer ServerInstallerFunction ----@field private _async boolean +---@field private _installer async fun(ctx: InstallContext) ---@field private _on_ready_handlers fun(server: Server)[] ---@field private _default_options table @The server's default options. This is used in @see Server#setup. M.Server = {} @@ -42,7 +41,6 @@ function M.Server:new(opts) root_dir = opts.root_dir, homepage = opts.homepage, deprecated = opts.deprecated, - _async = opts.async or false, languages = opts.languages or {}, _on_ready_handlers = {}, _installer = opts.installer, @@ -53,6 +51,10 @@ end ---Sets up the language server via lspconfig. This function has the same signature as the setup function in nvim-lspconfig. ---@param opts table @The lspconfig server configuration. function M.Server:setup_lsp(opts) + assert( + not settings.uses_new_setup, + "Please set up servers directly via lspconfig instead of going through nvim-lsp-installer (this method is now deprecated)! Refer to :h nvim-lsp-installer-quickstart for more information." + ) -- We require the lspconfig server here in order to do it as late as possible. -- The reason for this is because once a lspconfig server has been imported, it's -- automatically registered with lspconfig and causes it to show up in :LspInfo and whatnot. @@ -75,6 +77,10 @@ function M.Server:setup(opts) not settings.uses_new_setup, "Please set up servers directly via lspconfig instead of going through nvim-lsp-installer (this method is now deprecated)! Refer to :h nvim-lsp-installer-quickstart for more information." ) + notify( + "server:setup() has been deprecated. Set up servers directly via lspconfig instead. See https://github.com/williamboman/nvim-lsp-installer/discussions/636", + vim.log.levels.WARN + ) self:setup_lsp(opts) if not (opts.autostart == false) then self:attach_buffers() @@ -142,7 +148,7 @@ function M.Server:get_tmp_install_dir() return path.concat { settings.current.install_root_dir, ("%s.tmp"):format(self.name) } end ----@param context ServerInstallContext +---@param context table function M.Server:_setup_install_context(context) context.install_dir = self:get_tmp_install_dir() fs.rm_mkdirp(context.install_dir) @@ -214,71 +220,24 @@ function M.Server:get_receipt() return nil end ----@param context ServerInstallContext ----@param callback ServerInstallCallback +---@param context table +---@param callback fun(success: boolean) function M.Server:install_attached(context, callback) - if self._async then - a.run(function() - local install_context = InstallContext.new { - name = self.name, - boundary_path = settings.current.install_root_dir, - stdio_sink = context.stdio_sink, - destination_dir = self.root_dir, - requested_version = Optional.of_nilable(context.requested_server_version), - } - installer.execute(install_context, self._installer):get_or_throw() - a.scheduler() - dispatcher.dispatch_server_ready(self) - for _, on_ready_handler in ipairs(self._on_ready_handlers) do - on_ready_handler(self) - end - end, callback) - else - --- Deprecated - a.run( - function() - context.receipt = receipt.InstallReceiptBuilder.new() - context.receipt:with_start_time(vim.loop.gettimeofday()) - - a.scheduler() - self:_setup_install_context(context) - local async_installer = a.promisify(function(server, context, callback) - local normalized_installer = type(self._installer) == "function" and self._installer - or installers.pipe(self._installer) - -- args are shifted - return normalized_installer(server, callback, context) - end) - assert(async_installer(self, context), "Installation failed.") - - a.scheduler() - if not self:promote_install_dir(context.install_dir) then - error(("Failed to promote the temporary installation directory %q."):format(context.install_dir)) - end - - self:_write_receipt(context.receipt) - - -- Dispatch the server is ready - vim.schedule(function() - dispatcher.dispatch_server_ready(self) - for _, on_ready_handler in ipairs(self._on_ready_handlers) do - on_ready_handler(self) - end - end) - end, - vim.schedule_wrap(function(ok, result) - if not ok then - pcall(fs.rmrf, context.install_dir) - log.fmt_error("Server installation failed, server_name=%s, error=%s", self.name, result) - context.stdio_sink.stderr(tostring(result) .. "\n") - end - -- The tmp dir should in most cases have been "promoted" and already renamed to its final destination, - -- but we make sure to delete it should the installer modify the installation working directory during - -- installation. - pcall(fs.rmrf, self:get_tmp_install_dir()) - callback(ok) - end) - ) - end + a.run(function() + local install_context = InstallContext.new { + name = self.name, + boundary_path = settings.current.install_root_dir, + stdio_sink = context.stdio_sink, + destination_dir = self.root_dir, + requested_version = Optional.of_nilable(context.requested_server_version), + } + installer.execute(install_context, self._installer):get_or_throw() + a.scheduler() + dispatcher.dispatch_server_ready(self) + for _, on_ready_handler in ipairs(self._on_ready_handlers) do + on_ready_handler(self) + end + end, callback) end function M.Server:uninstall() diff --git a/lua/nvim-lsp-installer/servers/angularls/init.lua b/lua/nvim-lsp-installer/servers/angularls/init.lua index 23970b25..c6fe99eb 100644 --- a/lua/nvim-lsp-installer/servers/angularls/init.lua +++ b/lua/nvim-lsp-installer/servers/angularls/init.lua @@ -42,7 +42,6 @@ return function(name, root_dir) homepage = "https://angular.io/guide/language-service", languages = { "angular" }, installer = npm.packages { "@angular/language-server", "typescript" }, - async = true, default_options = { cmd = get_cmd(path.cwd()), cmd_env = npm.env(root_dir), diff --git a/lua/nvim-lsp-installer/servers/ansiblels/init.lua b/lua/nvim-lsp-installer/servers/ansiblels/init.lua index 3c3c753d..7b35e1d1 100644 --- a/lua/nvim-lsp-installer/servers/ansiblels/init.lua +++ b/lua/nvim-lsp-installer/servers/ansiblels/init.lua @@ -9,7 +9,6 @@ return function(name, root_dir) root_dir = root_dir, languages = { "ansible" }, homepage = "https://github.com/ansible/ansible-language-server", - async = true, installer = function() git.clone({ "https://github.com/ansible/ansible-language-server" }).with_receipt() -- ansiblels has quite a strict npm version requirement. diff --git a/lua/nvim-lsp-installer/servers/arduino_language_server/init.lua b/lua/nvim-lsp-installer/servers/arduino_language_server/init.lua index b46592e5..47c28a3d 100644 --- a/lua/nvim-lsp-installer/servers/arduino_language_server/init.lua +++ b/lua/nvim-lsp-installer/servers/arduino_language_server/init.lua @@ -14,7 +14,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://github.com/arduino/arduino-language-server", languages = { "arduino" }, - async = true, installer = function() local opts = { repo = "arduino/arduino-language-server", diff --git a/lua/nvim-lsp-installer/servers/asm_lsp/init.lua b/lua/nvim-lsp-installer/servers/asm_lsp/init.lua index f80f8401..63c64c63 100644 --- a/lua/nvim-lsp-installer/servers/asm_lsp/init.lua +++ b/lua/nvim-lsp-installer/servers/asm_lsp/init.lua @@ -7,7 +7,6 @@ return function(name, root_dir) root_dir = root_dir, languages = { "assembly-gas", "assembly-nasm", "assembly-go" }, homepage = "https://github.com/bergercookie/asm-lsp", - async = true, installer = cargo.crate "asm-lsp", default_options = { cmd_env = cargo.env(root_dir), diff --git a/lua/nvim-lsp-installer/servers/astro/init.lua b/lua/nvim-lsp-installer/servers/astro/init.lua index 6dfc445e..a2515738 100644 --- a/lua/nvim-lsp-installer/servers/astro/init.lua +++ b/lua/nvim-lsp-installer/servers/astro/init.lua @@ -8,7 +8,6 @@ return function(name, root_dir) languages = { "astro" }, homepage = "https://github.com/withastro/language-tools/tree/main/packages/language-server", installer = npm.packages { "@astrojs/language-server" }, - async = true, default_options = { cmd_env = npm.env(root_dir), }, diff --git a/lua/nvim-lsp-installer/servers/awk_ls/init.lua b/lua/nvim-lsp-installer/servers/awk_ls/init.lua index 213abaca..457c6dbf 100644 --- a/lua/nvim-lsp-installer/servers/awk_ls/init.lua +++ b/lua/nvim-lsp-installer/servers/awk_ls/init.lua @@ -8,7 +8,6 @@ return function(name, root_dir) languages = { "awk" }, homepage = "https://github.com/Beaglefoot/awk-language-server", installer = npm.packages { "awk-language-server" }, - async = true, default_options = { cmd_env = npm.env(root_dir), }, diff --git a/lua/nvim-lsp-installer/servers/bashls/init.lua b/lua/nvim-lsp-installer/servers/bashls/init.lua index bb3e5d53..5d1c3735 100644 --- a/lua/nvim-lsp-installer/servers/bashls/init.lua +++ b/lua/nvim-lsp-installer/servers/bashls/init.lua @@ -7,7 +7,6 @@ return function(name, root_dir) root_dir = root_dir, languages = { "bash" }, homepage = "https://github.com/bash-lsp/bash-language-server", - async = true, installer = npm.packages { "bash-language-server" }, default_options = { cmd_env = npm.env(root_dir), diff --git a/lua/nvim-lsp-installer/servers/beancount/init.lua b/lua/nvim-lsp-installer/servers/beancount/init.lua index fdadbb5d..bc35c080 100644 --- a/lua/nvim-lsp-installer/servers/beancount/init.lua +++ b/lua/nvim-lsp-installer/servers/beancount/init.lua @@ -7,7 +7,6 @@ return function(name, root_dir) root_dir = root_dir, languages = { "beancount" }, homepage = "https://github.com/polarmutex/beancount-language-server", - async = true, installer = cargo.crate "beancount-language-server", default_options = { cmd_env = cargo.env(root_dir), diff --git a/lua/nvim-lsp-installer/servers/bicep/init.lua b/lua/nvim-lsp-installer/servers/bicep/init.lua index 6f5f7064..b0b0c2b3 100644 --- a/lua/nvim-lsp-installer/servers/bicep/init.lua +++ b/lua/nvim-lsp-installer/servers/bicep/init.lua @@ -9,7 +9,6 @@ return function(name, root_dir) root_dir = root_dir, languages = { "bicep" }, homepage = "https://github.com/Azure/bicep", - async = true, ---@param ctx InstallContext installer = function(ctx) std.ensure_executable("dotnet", { help_url = "https://dotnet.microsoft.com/download" }) diff --git a/lua/nvim-lsp-installer/servers/bsl_ls/init.lua b/lua/nvim-lsp-installer/servers/bsl_ls/init.lua index 62c85079..4a29583e 100644 --- a/lua/nvim-lsp-installer/servers/bsl_ls/init.lua +++ b/lua/nvim-lsp-installer/servers/bsl_ls/init.lua @@ -9,7 +9,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://1c-syntax.github.io/bsl-language-server", languages = { "onescript" }, - async = true, installer = function() std.ensure_executable "java" local source = github.release_file { diff --git a/lua/nvim-lsp-installer/servers/ccls/init.lua b/lua/nvim-lsp-installer/servers/ccls/init.lua index 9fec618c..762c2d27 100644 --- a/lua/nvim-lsp-installer/servers/ccls/init.lua +++ b/lua/nvim-lsp-installer/servers/ccls/init.lua @@ -9,7 +9,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://github.com/MaskRay/ccls", languages = { "c", "c++", "objective-c" }, - async = true, installer = function() platform.when { mac = require "nvim-lsp-installer.servers.ccls.mac", diff --git a/lua/nvim-lsp-installer/servers/clangd/init.lua b/lua/nvim-lsp-installer/servers/clangd/init.lua index c4025fd5..2dfb8ba9 100644 --- a/lua/nvim-lsp-installer/servers/clangd/init.lua +++ b/lua/nvim-lsp-installer/servers/clangd/init.lua @@ -13,7 +13,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://clangd.llvm.org", languages = { "c", "c++" }, - async = true, ---@param ctx InstallContext installer = function(ctx) local source = github.unzip_release_file { diff --git a/lua/nvim-lsp-installer/servers/clarity_lsp/init.lua b/lua/nvim-lsp-installer/servers/clarity_lsp/init.lua index ae5bea52..d70f0668 100644 --- a/lua/nvim-lsp-installer/servers/clarity_lsp/init.lua +++ b/lua/nvim-lsp-installer/servers/clarity_lsp/init.lua @@ -12,7 +12,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://github.com/hirosystems/clarity-lsp", languages = { "clarity" }, - async = true, installer = function() github.unzip_release_file({ repo = "hirosystems/clarity-lsp", diff --git a/lua/nvim-lsp-installer/servers/clojure_lsp/init.lua b/lua/nvim-lsp-installer/servers/clojure_lsp/init.lua index a160a9a6..a7fa93a4 100644 --- a/lua/nvim-lsp-installer/servers/clojure_lsp/init.lua +++ b/lua/nvim-lsp-installer/servers/clojure_lsp/init.lua @@ -13,7 +13,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://clojure-lsp.io", languages = { "clojure" }, - async = true, installer = function() github.unzip_release_file({ repo = "clojure-lsp/clojure-lsp", diff --git a/lua/nvim-lsp-installer/servers/cmake/init.lua b/lua/nvim-lsp-installer/servers/cmake/init.lua index f6c3058a..5ef7ed21 100644 --- a/lua/nvim-lsp-installer/servers/cmake/init.lua +++ b/lua/nvim-lsp-installer/servers/cmake/init.lua @@ -7,7 +7,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://github.com/regen100/cmake-language-server", languages = { "cmake" }, - async = true, installer = pip3.packages { "cmake-language-server" }, default_options = { cmd_env = pip3.env(root_dir), diff --git a/lua/nvim-lsp-installer/servers/codeqlls/init.lua b/lua/nvim-lsp-installer/servers/codeqlls/init.lua index 87106e1e..f22cc150 100644 --- a/lua/nvim-lsp-installer/servers/codeqlls/init.lua +++ b/lua/nvim-lsp-installer/servers/codeqlls/init.lua @@ -12,7 +12,6 @@ return function(name, root_dir) name = name, root_dir = root_dir, languages = { "codeql" }, - async = true, installer = function() github.unzip_release_file({ repo = "github/codeql-cli-binaries", diff --git a/lua/nvim-lsp-installer/servers/crystalline/init.lua b/lua/nvim-lsp-installer/servers/crystalline/init.lua index 67d61a9e..398f1624 100644 --- a/lua/nvim-lsp-installer/servers/crystalline/init.lua +++ b/lua/nvim-lsp-installer/servers/crystalline/init.lua @@ -14,7 +14,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://github.com/elbywan/crystalline", languages = { "crystal" }, - async = true, installer = function() github.gunzip_release_file({ repo = "elbywan/crystalline", diff --git a/lua/nvim-lsp-installer/servers/csharp_ls/init.lua b/lua/nvim-lsp-installer/servers/csharp_ls/init.lua index 8600782d..a39ab8e8 100644 --- a/lua/nvim-lsp-installer/servers/csharp_ls/init.lua +++ b/lua/nvim-lsp-installer/servers/csharp_ls/init.lua @@ -7,7 +7,6 @@ return function(name, root_dir) root_dir = root_dir, languages = { "c#" }, homepage = "https://github.com/razzmatazz/csharp-language-server", - async = true, installer = dotnet.package "csharp-ls", default_options = { cmd_env = dotnet.env(root_dir), diff --git a/lua/nvim-lsp-installer/servers/cssmodules_ls/init.lua b/lua/nvim-lsp-installer/servers/cssmodules_ls/init.lua index cf09539f..28b0e232 100644 --- a/lua/nvim-lsp-installer/servers/cssmodules_ls/init.lua +++ b/lua/nvim-lsp-installer/servers/cssmodules_ls/init.lua @@ -8,7 +8,6 @@ return function(name, root_dir) homepage = "https://github.com/antonk52/cssmodules-language-server", languages = { "css" }, installer = npm.packages { "cssmodules-language-server" }, - async = true, default_options = { cmd_env = npm.env(root_dir), }, diff --git a/lua/nvim-lsp-installer/servers/cucumber_language_server/init.lua b/lua/nvim-lsp-installer/servers/cucumber_language_server/init.lua index 3d810f01..d4badc5d 100644 --- a/lua/nvim-lsp-installer/servers/cucumber_language_server/init.lua +++ b/lua/nvim-lsp-installer/servers/cucumber_language_server/init.lua @@ -8,7 +8,6 @@ return function(name, root_dir) languages = { "cucumber" }, homepage = "https://github.com/cucumber/language-server", installer = npm.packages { "@cucumber/language-server" }, - async = true, default_options = { cmd_env = npm.env(root_dir), }, diff --git a/lua/nvim-lsp-installer/servers/dartls/init.lua b/lua/nvim-lsp-installer/servers/dartls/init.lua index 8f0437fe..04f761e1 100644 --- a/lua/nvim-lsp-installer/servers/dartls/init.lua +++ b/lua/nvim-lsp-installer/servers/dartls/init.lua @@ -7,7 +7,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://github.com/dart-lang/sdk", languages = { "dart" }, - async = true, installer = std.system_executable("dart", { help_url = "https://dart.dev/get-dart" }), default_options = {}, } diff --git a/lua/nvim-lsp-installer/servers/denols/init.lua b/lua/nvim-lsp-installer/servers/denols/init.lua index 37ae7e6d..6c3096fb 100644 --- a/lua/nvim-lsp-installer/servers/denols/init.lua +++ b/lua/nvim-lsp-installer/servers/denols/init.lua @@ -12,7 +12,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://deno.land/x/deno/cli/lsp", languages = { "deno" }, - async = true, installer = function() github.unzip_release_file({ repo = "denoland/deno", diff --git a/lua/nvim-lsp-installer/servers/dhall_lsp_server/init.lua b/lua/nvim-lsp-installer/servers/dhall_lsp_server/init.lua index 27604f0c..c8e3fd71 100644 --- a/lua/nvim-lsp-installer/servers/dhall_lsp_server/init.lua +++ b/lua/nvim-lsp-installer/servers/dhall_lsp_server/init.lua @@ -15,7 +15,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://dhall-lang.org/", languages = { "dhall" }, - async = true, ---@param ctx InstallContext installer = function(ctx) local repo = "dhall-lang/dhall-haskell" diff --git a/lua/nvim-lsp-installer/servers/diagnosticls/init.lua b/lua/nvim-lsp-installer/servers/diagnosticls/init.lua index 9b822a2b..bbb6cf27 100644 --- a/lua/nvim-lsp-installer/servers/diagnosticls/init.lua +++ b/lua/nvim-lsp-installer/servers/diagnosticls/init.lua @@ -8,7 +8,6 @@ return function(name, root_dir) languages = {}, homepage = "https://github.com/iamcco/diagnostic-languageserver", installer = npm.packages { "diagnostic-languageserver" }, - async = true, default_options = { cmd_env = npm.env(root_dir), }, diff --git a/lua/nvim-lsp-installer/servers/dockerls/init.lua b/lua/nvim-lsp-installer/servers/dockerls/init.lua index 45ce6806..466b9e0f 100644 --- a/lua/nvim-lsp-installer/servers/dockerls/init.lua +++ b/lua/nvim-lsp-installer/servers/dockerls/init.lua @@ -8,7 +8,6 @@ return function(name, root_dir) homepage = "https://github.com/rcjsuen/dockerfile-language-server-nodejs", languages = { "docker" }, installer = npm.packages { "dockerfile-language-server-nodejs" }, - async = true, default_options = { cmd_env = npm.env(root_dir), }, diff --git a/lua/nvim-lsp-installer/servers/dotls/init.lua b/lua/nvim-lsp-installer/servers/dotls/init.lua index 26400b65..0ffd8dab 100644 --- a/lua/nvim-lsp-installer/servers/dotls/init.lua +++ b/lua/nvim-lsp-installer/servers/dotls/init.lua @@ -8,7 +8,6 @@ return function(name, root_dir) homepage = "https://github.com/nikeee/dot-language-server", languages = { "dot" }, installer = npm.packages { "dot-language-server" }, - async = true, default_options = { cmd_env = npm.env(root_dir), }, diff --git a/lua/nvim-lsp-installer/servers/efm/init.lua b/lua/nvim-lsp-installer/servers/efm/init.lua index 0077b66e..6c431bee 100644 --- a/lua/nvim-lsp-installer/servers/efm/init.lua +++ b/lua/nvim-lsp-installer/servers/efm/init.lua @@ -7,7 +7,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://github.com/mattn/efm-langserver", languages = {}, - async = true, installer = go.packages { "github.com/mattn/efm-langserver" }, default_options = { cmd_env = go.env(root_dir), diff --git a/lua/nvim-lsp-installer/servers/elixirls/init.lua b/lua/nvim-lsp-installer/servers/elixirls/init.lua index 006c0222..812b082a 100644 --- a/lua/nvim-lsp-installer/servers/elixirls/init.lua +++ b/lua/nvim-lsp-installer/servers/elixirls/init.lua @@ -10,7 +10,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://github.com/elixir-lsp/elixir-ls", languages = { "elixir" }, - async = true, ---@param ctx InstallContext installer = function(ctx) -- We write to the elixir-ls directory for backwards compatibility reasons diff --git a/lua/nvim-lsp-installer/servers/elmls/init.lua b/lua/nvim-lsp-installer/servers/elmls/init.lua index 30eebfd3..7323a475 100644 --- a/lua/nvim-lsp-installer/servers/elmls/init.lua +++ b/lua/nvim-lsp-installer/servers/elmls/init.lua @@ -8,7 +8,6 @@ return function(name, 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" }, - async = true, default_options = { cmd_env = npm.env(root_dir), }, diff --git a/lua/nvim-lsp-installer/servers/ember/init.lua b/lua/nvim-lsp-installer/servers/ember/init.lua index 3ebddec9..63eb4fc2 100644 --- a/lua/nvim-lsp-installer/servers/ember/init.lua +++ b/lua/nvim-lsp-installer/servers/ember/init.lua @@ -8,7 +8,6 @@ return function(name, root_dir) languages = { "ember" }, homepage = "https://github.com/lifeart/ember-language-server", installer = npm.packages { "@lifeart/ember-language-server" }, - async = true, default_options = { cmd_env = npm.env(root_dir), }, diff --git a/lua/nvim-lsp-installer/servers/emmet_ls/init.lua b/lua/nvim-lsp-installer/servers/emmet_ls/init.lua index 91258daa..404fe6e2 100644 --- a/lua/nvim-lsp-installer/servers/emmet_ls/init.lua +++ b/lua/nvim-lsp-installer/servers/emmet_ls/init.lua @@ -8,7 +8,6 @@ return function(name, root_dir) homepage = "https://github.com/aca/emmet-ls", languages = { "emmet" }, installer = npm.packages { "emmet-ls" }, - async = true, default_options = { cmd_env = npm.env(root_dir), }, diff --git a/lua/nvim-lsp-installer/servers/erlangls/init.lua b/lua/nvim-lsp-installer/servers/erlangls/init.lua index 52b2e8ea..21884a74 100644 --- a/lua/nvim-lsp-installer/servers/erlangls/init.lua +++ b/lua/nvim-lsp-installer/servers/erlangls/init.lua @@ -15,7 +15,6 @@ return function(name, root_dir) root_dir = root_dir, languages = { "erlang" }, homepage = "https://erlang-ls.github.io/", - async = true, ---@param ctx InstallContext installer = function(ctx) std.ensure_executable(rebar3, { help_url = "http://rebar3.org/docs/" }) diff --git a/lua/nvim-lsp-installer/servers/esbonio/init.lua b/lua/nvim-lsp-installer/servers/esbonio/init.lua index b0de81d7..06df4e5c 100644 --- a/lua/nvim-lsp-installer/servers/esbonio/init.lua +++ b/lua/nvim-lsp-installer/servers/esbonio/init.lua @@ -7,7 +7,6 @@ return function(name, root_dir) root_dir = root_dir, languages = { "sphinx" }, homepage = "https://pypi.org/project/esbonio/", - async = true, installer = pip3.packages { "esbonio" }, default_options = { cmd_env = pip3.env(root_dir), diff --git a/lua/nvim-lsp-installer/servers/flux_lsp/init.lua b/lua/nvim-lsp-installer/servers/flux_lsp/init.lua index be9ffce5..d47e4a44 100644 --- a/lua/nvim-lsp-installer/servers/flux_lsp/init.lua +++ b/lua/nvim-lsp-installer/servers/flux_lsp/init.lua @@ -7,7 +7,6 @@ return function(name, root_dir) root_dir = root_dir, languages = { "flux" }, homepage = "https://github.com/influxdata/flux-lsp", - async = true, installer = cargo.crate("https://github.com/influxdata/flux-lsp", { git = true, }), diff --git a/lua/nvim-lsp-installer/servers/foam_ls/init.lua b/lua/nvim-lsp-installer/servers/foam_ls/init.lua index 2586b242..79c09118 100644 --- a/lua/nvim-lsp-installer/servers/foam_ls/init.lua +++ b/lua/nvim-lsp-installer/servers/foam_ls/init.lua @@ -8,7 +8,6 @@ return function(name, root_dir) homepage = "https://github.com/FoamScience/foam-language-server", languages = { "foam", "OpenFOAM" }, installer = npm.packages { "foam-language-server" }, - async = true, default_options = { cmd_env = npm.env(root_dir), }, diff --git a/lua/nvim-lsp-installer/servers/fortls/init.lua b/lua/nvim-lsp-installer/servers/fortls/init.lua index 466dc910..2aa8f946 100644 --- a/lua/nvim-lsp-installer/servers/fortls/init.lua +++ b/lua/nvim-lsp-installer/servers/fortls/init.lua @@ -7,7 +7,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://github.com/hansec/fortran-language-server", languages = { "fortran" }, - async = true, installer = pip3.packages { "fortran-language-server" }, default_options = { cmd_env = pip3.env(root_dir), diff --git a/lua/nvim-lsp-installer/servers/fsautocomplete/init.lua b/lua/nvim-lsp-installer/servers/fsautocomplete/init.lua index fd075ba7..d404e89f 100644 --- a/lua/nvim-lsp-installer/servers/fsautocomplete/init.lua +++ b/lua/nvim-lsp-installer/servers/fsautocomplete/init.lua @@ -7,7 +7,6 @@ return function(name, root_dir) root_dir = root_dir, languages = { "f#" }, homepage = "https://github.com/fsharp/FsAutoComplete", - async = true, installer = dotnet.package "fsautocomplete", default_options = { cmd_env = dotnet.env(root_dir), diff --git a/lua/nvim-lsp-installer/servers/golangci_lint_ls/init.lua b/lua/nvim-lsp-installer/servers/golangci_lint_ls/init.lua index 3a0e8db7..58a85391 100644 --- a/lua/nvim-lsp-installer/servers/golangci_lint_ls/init.lua +++ b/lua/nvim-lsp-installer/servers/golangci_lint_ls/init.lua @@ -7,7 +7,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://github.com/nametake/golangci-lint-langserver", languages = { "go" }, - async = true, installer = go.packages { "github.com/nametake/golangci-lint-langserver", "github.com/golangci/golangci-lint/cmd/golangci-lint", diff --git a/lua/nvim-lsp-installer/servers/gopls/init.lua b/lua/nvim-lsp-installer/servers/gopls/init.lua index a540a856..f83dbc65 100644 --- a/lua/nvim-lsp-installer/servers/gopls/init.lua +++ b/lua/nvim-lsp-installer/servers/gopls/init.lua @@ -7,7 +7,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://pkg.go.dev/golang.org/x/tools/gopls", languages = { "go" }, - async = true, installer = go.packages { "golang.org/x/tools/gopls" }, default_options = { cmd_env = go.env(root_dir), diff --git a/lua/nvim-lsp-installer/servers/grammarly/init.lua b/lua/nvim-lsp-installer/servers/grammarly/init.lua index 58c7a217..0fef8d46 100644 --- a/lua/nvim-lsp-installer/servers/grammarly/init.lua +++ b/lua/nvim-lsp-installer/servers/grammarly/init.lua @@ -8,7 +8,6 @@ return function(name, root_dir) homepage = "https://github.com/znck/grammarly", languages = {}, installer = npm.packages { "@emacs-grammarly/unofficial-grammarly-language-server" }, - async = true, default_options = { cmd_env = npm.env(root_dir), }, diff --git a/lua/nvim-lsp-installer/servers/graphql/init.lua b/lua/nvim-lsp-installer/servers/graphql/init.lua index fe0ac0f0..115478cb 100644 --- a/lua/nvim-lsp-installer/servers/graphql/init.lua +++ b/lua/nvim-lsp-installer/servers/graphql/init.lua @@ -8,7 +8,6 @@ return function(name, root_dir) homepage = "https://www.npmjs.com/package/graphql-language-service-cli", languages = { "graphql" }, installer = npm.packages { "graphql-language-service-cli", "graphql" }, - async = true, default_options = { cmd_env = npm.env(root_dir), }, diff --git a/lua/nvim-lsp-installer/servers/groovyls/init.lua b/lua/nvim-lsp-installer/servers/groovyls/init.lua index 8f7b4617..c175e2d5 100644 --- a/lua/nvim-lsp-installer/servers/groovyls/init.lua +++ b/lua/nvim-lsp-installer/servers/groovyls/init.lua @@ -9,7 +9,6 @@ return function(name, root_dir) root_dir = root_dir, languages = { "groovy" }, homepage = "https://github.com/GroovyLanguageServer/groovy-language-server", - async = true, ---@param ctx InstallContext installer = function(ctx) std.ensure_executable "javac" diff --git a/lua/nvim-lsp-installer/servers/haxe_language_server/init.lua b/lua/nvim-lsp-installer/servers/haxe_language_server/init.lua index f07cdd33..394aa85e 100644 --- a/lua/nvim-lsp-installer/servers/haxe_language_server/init.lua +++ b/lua/nvim-lsp-installer/servers/haxe_language_server/init.lua @@ -10,7 +10,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://github.com/vshaxe/haxe-language-server", languages = { "haxe" }, - async = true, ---@param ctx InstallContext installer = function(ctx) std.ensure_executable("haxelib", { help_url = "https://haxe.org" }) diff --git a/lua/nvim-lsp-installer/servers/hls/init.lua b/lua/nvim-lsp-installer/servers/hls/init.lua index 293b1580..969727ca 100644 --- a/lua/nvim-lsp-installer/servers/hls/init.lua +++ b/lua/nvim-lsp-installer/servers/hls/init.lua @@ -14,7 +14,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://haskell-language-server.readthedocs.io/en/latest/", languages = { "haskell" }, - async = true, ---@param ctx InstallContext installer = function(ctx) local repo = "haskell/haskell-language-server" diff --git a/lua/nvim-lsp-installer/servers/hoon_ls/init.lua b/lua/nvim-lsp-installer/servers/hoon_ls/init.lua index 24f8eab1..630595a6 100644 --- a/lua/nvim-lsp-installer/servers/hoon_ls/init.lua +++ b/lua/nvim-lsp-installer/servers/hoon_ls/init.lua @@ -7,7 +7,6 @@ return function(name, root_dir) root_dir = root_dir, languages = { "hoon" }, homepage = "https://github.com/urbit/hoon-language-server", - async = true, installer = npm.packages { "@urbit/hoon-language-server" }, default_options = { cmd_env = npm.env(root_dir), diff --git a/lua/nvim-lsp-installer/servers/intelephense/init.lua b/lua/nvim-lsp-installer/servers/intelephense/init.lua index e4e86c29..6fbf1c9c 100644 --- a/lua/nvim-lsp-installer/servers/intelephense/init.lua +++ b/lua/nvim-lsp-installer/servers/intelephense/init.lua @@ -8,7 +8,6 @@ return function(name, root_dir) homepage = "https://intelephense.com", languages = { "php" }, installer = npm.packages { "intelephense" }, - async = true, default_options = { cmd_env = npm.env(root_dir), }, diff --git a/lua/nvim-lsp-installer/servers/jdtls/init.lua b/lua/nvim-lsp-installer/servers/jdtls/init.lua index c36a8f87..591617ba 100644 --- a/lua/nvim-lsp-installer/servers/jdtls/init.lua +++ b/lua/nvim-lsp-installer/servers/jdtls/init.lua @@ -73,7 +73,6 @@ return function(name, root_dir) root_dir = root_dir, languages = { "java" }, homepage = "https://github.com/eclipse/eclipse.jdt.ls", - async = true, ---@param ctx InstallContext installer = function(ctx) std.ensure_executable "java" diff --git a/lua/nvim-lsp-installer/servers/jedi_language_server/init.lua b/lua/nvim-lsp-installer/servers/jedi_language_server/init.lua index 86c4ebe1..b21ed897 100644 --- a/lua/nvim-lsp-installer/servers/jedi_language_server/init.lua +++ b/lua/nvim-lsp-installer/servers/jedi_language_server/init.lua @@ -7,7 +7,6 @@ return function(name, root_dir) root_dir = root_dir, languages = { "python" }, homepage = "https://github.com/pappasam/jedi-language-server", - async = true, installer = pip3.packages { "jedi-language-server" }, default_options = { cmd_env = pip3.env(root_dir), diff --git a/lua/nvim-lsp-installer/servers/jsonnet_ls/init.lua b/lua/nvim-lsp-installer/servers/jsonnet_ls/init.lua index 7a20d8c7..25cb1b12 100644 --- a/lua/nvim-lsp-installer/servers/jsonnet_ls/init.lua +++ b/lua/nvim-lsp-installer/servers/jsonnet_ls/init.lua @@ -7,7 +7,6 @@ return function(name, root_dir) name = name, root_dir = root_dir, homepage = "https://github.com/grafana/jsonnet-language-server", - async = true, 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 diff --git a/lua/nvim-lsp-installer/servers/julials/init.lua b/lua/nvim-lsp-installer/servers/julials/init.lua index afbb16eb..714bce1b 100644 --- a/lua/nvim-lsp-installer/servers/julials/init.lua +++ b/lua/nvim-lsp-installer/servers/julials/init.lua @@ -26,7 +26,6 @@ runserver(stdin, root_dir = root_dir, homepage = "https://github.com/julia-vscode/LanguageServer.jl", languages = { "julia" }, - async = true, ---@param ctx InstallContext installer = function(ctx) std.ensure_executable("julia", { help_url = "https://julialang.org/downloads/" }) diff --git a/lua/nvim-lsp-installer/servers/kotlin_language_server/init.lua b/lua/nvim-lsp-installer/servers/kotlin_language_server/init.lua index a8330fca..f5b7d9b7 100644 --- a/lua/nvim-lsp-installer/servers/kotlin_language_server/init.lua +++ b/lua/nvim-lsp-installer/servers/kotlin_language_server/init.lua @@ -9,7 +9,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://github.com/fwcd/kotlin-language-server", languages = { "kotlin" }, - async = true, installer = function() github.unzip_release_file({ repo = "fwcd/kotlin-language-server", diff --git a/lua/nvim-lsp-installer/servers/lelwel_ls/init.lua b/lua/nvim-lsp-installer/servers/lelwel_ls/init.lua index d69aedd5..2aefd068 100644 --- a/lua/nvim-lsp-installer/servers/lelwel_ls/init.lua +++ b/lua/nvim-lsp-installer/servers/lelwel_ls/init.lua @@ -7,7 +7,6 @@ return function(name, root_dir) root_dir = root_dir, languages = { "lelwel" }, homepage = "https://github.com/0x2a-42/lelwel", - async = true, installer = cargo.crate("lelwel", { features = "lsp", }), diff --git a/lua/nvim-lsp-installer/servers/lemminx/init.lua b/lua/nvim-lsp-installer/servers/lemminx/init.lua index 97de73f4..d83bcf25 100644 --- a/lua/nvim-lsp-installer/servers/lemminx/init.lua +++ b/lua/nvim-lsp-installer/servers/lemminx/init.lua @@ -12,7 +12,6 @@ return function(name, root_dir) root_dir = root_dir, languages = { "xml" }, homepage = "https://github.com/eclipse/lemminx", - async = true, ---@param ctx InstallContext installer = function(ctx) local unzipped_file = assert( diff --git a/lua/nvim-lsp-installer/servers/ltex/init.lua b/lua/nvim-lsp-installer/servers/ltex/init.lua index a9c09b8d..b3b91e25 100644 --- a/lua/nvim-lsp-installer/servers/ltex/init.lua +++ b/lua/nvim-lsp-installer/servers/ltex/init.lua @@ -13,7 +13,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://valentjn.github.io/vscode-ltex", languages = { "latex" }, - async = true, ---@param ctx InstallContext installer = function(ctx) if platform.is_win then diff --git a/lua/nvim-lsp-installer/servers/mm0_ls/init.lua b/lua/nvim-lsp-installer/servers/mm0_ls/init.lua index 6050f3f3..6c20de45 100644 --- a/lua/nvim-lsp-installer/servers/mm0_ls/init.lua +++ b/lua/nvim-lsp-installer/servers/mm0_ls/init.lua @@ -9,7 +9,6 @@ return function(name, root_dir) root_dir = root_dir, languages = { "metamath-zero" }, homepage = "https://github.com/digama0/mm0", - async = true, ---@param ctx InstallContext installer = function(ctx) git.clone({ "https://github.com/digama0/mm0" }).with_receipt() diff --git a/lua/nvim-lsp-installer/servers/nickel_ls/init.lua b/lua/nvim-lsp-installer/servers/nickel_ls/init.lua index 01bf1004..7e399949 100644 --- a/lua/nvim-lsp-installer/servers/nickel_ls/init.lua +++ b/lua/nvim-lsp-installer/servers/nickel_ls/init.lua @@ -9,7 +9,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://nickel-lang.org/", languages = { "nickel" }, - async = true, installer = function(ctx) git.clone({ "https://github.com/tweag/nickel" }).with_receipt() ctx.spawn.cargo { diff --git a/lua/nvim-lsp-installer/servers/nimls/init.lua b/lua/nvim-lsp-installer/servers/nimls/init.lua index e92a891a..d29e57a9 100644 --- a/lua/nvim-lsp-installer/servers/nimls/init.lua +++ b/lua/nvim-lsp-installer/servers/nimls/init.lua @@ -8,7 +8,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://github.com/PMunch/nimlsp", languages = { "nim" }, - async = true, ---@param ctx InstallContext installer = function(ctx) git.clone({ "https://github.com/PMunch/nimlsp.git" }).with_receipt() diff --git a/lua/nvim-lsp-installer/servers/ocamlls/init.lua b/lua/nvim-lsp-installer/servers/ocamlls/init.lua index 062be8e7..2d98e6ca 100644 --- a/lua/nvim-lsp-installer/servers/ocamlls/init.lua +++ b/lua/nvim-lsp-installer/servers/ocamlls/init.lua @@ -12,7 +12,6 @@ return function(name, root_dir) homepage = "https://github.com/ocaml-lsp/ocaml-language-server", languages = { "ocaml" }, installer = npm.packages { "ocaml-language-server" }, - async = true, default_options = { cmd_env = npm.env(root_dir), }, diff --git a/lua/nvim-lsp-installer/servers/ocamllsp/init.lua b/lua/nvim-lsp-installer/servers/ocamllsp/init.lua index ad51cfa4..0be2ce00 100644 --- a/lua/nvim-lsp-installer/servers/ocamllsp/init.lua +++ b/lua/nvim-lsp-installer/servers/ocamllsp/init.lua @@ -7,7 +7,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://github.com/ocaml/ocaml-lsp", languages = { "ocaml" }, - async = true, installer = opam.packages { "ocaml-lsp-server" }, default_options = { cmd_env = opam.env(root_dir), diff --git a/lua/nvim-lsp-installer/servers/omnisharp/init.lua b/lua/nvim-lsp-installer/servers/omnisharp/init.lua index f45df354..0bce7a85 100644 --- a/lua/nvim-lsp-installer/servers/omnisharp/init.lua +++ b/lua/nvim-lsp-installer/servers/omnisharp/init.lua @@ -13,7 +13,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://github.com/OmniSharp/omnisharp-roslyn", languages = { "c#" }, - async = true, ---@param ctx InstallContext installer = function(ctx) std.ensure_executable("dotnet", { help_url = "https://dotnet.microsoft.com/download" }) diff --git a/lua/nvim-lsp-installer/servers/opencl_ls/init.lua b/lua/nvim-lsp-installer/servers/opencl_ls/init.lua index 50ed529d..03b8b75d 100644 --- a/lua/nvim-lsp-installer/servers/opencl_ls/init.lua +++ b/lua/nvim-lsp-installer/servers/opencl_ls/init.lua @@ -12,7 +12,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://github.com/Galarius/opencl-language-server", languages = { "opencl" }, - async = true, installer = function() platform.when { unix = function() diff --git a/lua/nvim-lsp-installer/servers/perlnavigator/init.lua b/lua/nvim-lsp-installer/servers/perlnavigator/init.lua index fc82fe3c..272748c7 100644 --- a/lua/nvim-lsp-installer/servers/perlnavigator/init.lua +++ b/lua/nvim-lsp-installer/servers/perlnavigator/init.lua @@ -9,7 +9,6 @@ return function(name, root_dir) languages = { "perl" }, homepage = "https://github.com/bscan/PerlNavigator", installer = npm.packages { "perlnavigator-server" }, - async = true, default_options = { cmd = { "node", diff --git a/lua/nvim-lsp-installer/servers/phpactor/init.lua b/lua/nvim-lsp-installer/servers/phpactor/init.lua index 1425ae2e..c51d3191 100644 --- a/lua/nvim-lsp-installer/servers/phpactor/init.lua +++ b/lua/nvim-lsp-installer/servers/phpactor/init.lua @@ -11,7 +11,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://phpactor.readthedocs.io/en/master/", languages = { "php" }, - async = true, installer = function() assert(platform.is_unix, "Phpactor only supports UNIX environments.") git.clone({ "https://github.com/phpactor/phpactor.git" }).with_receipt() diff --git a/lua/nvim-lsp-installer/servers/powershell_es/init.lua b/lua/nvim-lsp-installer/servers/powershell_es/init.lua index 8e2edd4d..0c390954 100644 --- a/lua/nvim-lsp-installer/servers/powershell_es/init.lua +++ b/lua/nvim-lsp-installer/servers/powershell_es/init.lua @@ -9,7 +9,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://github.com/PowerShell/PowerShellEditorServices", languages = { "powershell" }, - async = true, installer = function() std.ensure_executable("pwsh", { help_url = "https://github.com/PowerShell/PowerShell#get-powershell" }) github.unzip_release_file({ diff --git a/lua/nvim-lsp-installer/servers/prismals/init.lua b/lua/nvim-lsp-installer/servers/prismals/init.lua index e42aa1a1..a32c88a9 100644 --- a/lua/nvim-lsp-installer/servers/prismals/init.lua +++ b/lua/nvim-lsp-installer/servers/prismals/init.lua @@ -8,7 +8,6 @@ return function(name, root_dir) languages = { "prisma" }, homepage = "https://github.com/prisma/language-tools", installer = npm.packages { "@prisma/language-server" }, - async = true, default_options = { cmd_env = npm.env(root_dir), }, diff --git a/lua/nvim-lsp-installer/servers/prosemd_lsp/init.lua b/lua/nvim-lsp-installer/servers/prosemd_lsp/init.lua index 7ee6ff6f..3761627a 100644 --- a/lua/nvim-lsp-installer/servers/prosemd_lsp/init.lua +++ b/lua/nvim-lsp-installer/servers/prosemd_lsp/init.lua @@ -13,7 +13,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://github.com/kitten/prosemd-lsp", languages = { "markdown" }, - async = true, installer = function() local source = github.release_file { repo = "kitten/prosemd-lsp", diff --git a/lua/nvim-lsp-installer/servers/psalm/init.lua b/lua/nvim-lsp-installer/servers/psalm/init.lua index b6f63064..29f9754a 100644 --- a/lua/nvim-lsp-installer/servers/psalm/init.lua +++ b/lua/nvim-lsp-installer/servers/psalm/init.lua @@ -7,7 +7,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://psalm.dev/", languages = { "php" }, - async = true, installer = composer.packages { "vimeo/psalm" }, default_options = { cmd_env = composer.env(root_dir), diff --git a/lua/nvim-lsp-installer/servers/puppet/init.lua b/lua/nvim-lsp-installer/servers/puppet/init.lua index 9d302c2e..4f10669b 100644 --- a/lua/nvim-lsp-installer/servers/puppet/init.lua +++ b/lua/nvim-lsp-installer/servers/puppet/init.lua @@ -8,7 +8,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://github.com/puppetlabs/puppet-editor-services", languages = { "puppet" }, - async = true, installer = function() github.unzip_release_file({ repo = "puppetlabs/puppet-editor-services", diff --git a/lua/nvim-lsp-installer/servers/purescriptls/init.lua b/lua/nvim-lsp-installer/servers/purescriptls/init.lua index 338bb82c..cb1d4add 100644 --- a/lua/nvim-lsp-installer/servers/purescriptls/init.lua +++ b/lua/nvim-lsp-installer/servers/purescriptls/init.lua @@ -8,7 +8,6 @@ return function(name, root_dir) languages = { "purescript" }, homepage = "https://github.com/nwolverson/purescript-language-server", installer = npm.packages { "purescript-language-server" }, - async = true, default_options = { cmd_env = npm.env(root_dir), }, diff --git a/lua/nvim-lsp-installer/servers/pylsp/init.lua b/lua/nvim-lsp-installer/servers/pylsp/init.lua index 0ee9e6a0..21393e57 100644 --- a/lua/nvim-lsp-installer/servers/pylsp/init.lua +++ b/lua/nvim-lsp-installer/servers/pylsp/init.lua @@ -21,7 +21,6 @@ return function(name, root_dir) root_dir = root_dir, languages = { "python" }, homepage = "https://github.com/python-lsp/python-lsp-server", - async = true, installer = pip3.packages { "python-lsp-server[all]" }, default_options = { cmd_env = pip3.env(root_dir), diff --git a/lua/nvim-lsp-installer/servers/pyright/init.lua b/lua/nvim-lsp-installer/servers/pyright/init.lua index 73c6bed3..92b8dfc0 100644 --- a/lua/nvim-lsp-installer/servers/pyright/init.lua +++ b/lua/nvim-lsp-installer/servers/pyright/init.lua @@ -8,7 +8,6 @@ return function(name, root_dir) languages = { "python" }, homepage = "https://github.com/microsoft/pyright", installer = npm.packages { "pyright" }, - async = true, default_options = { cmd_env = npm.env(root_dir), }, diff --git a/lua/nvim-lsp-installer/servers/quick_lint_js/init.lua b/lua/nvim-lsp-installer/servers/quick_lint_js/init.lua index a90d86cc..25dac109 100644 --- a/lua/nvim-lsp-installer/servers/quick_lint_js/init.lua +++ b/lua/nvim-lsp-installer/servers/quick_lint_js/init.lua @@ -14,7 +14,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://quick-lint-js.com/", languages = { "javascript" }, - async = true, ---@param ctx InstallContext installer = function(ctx) local repo = "quick-lint/quick-lint-js" diff --git a/lua/nvim-lsp-installer/servers/r_language_server/init.lua b/lua/nvim-lsp-installer/servers/r_language_server/init.lua index 5a637271..37b1f654 100644 --- a/lua/nvim-lsp-installer/servers/r_language_server/init.lua +++ b/lua/nvim-lsp-installer/servers/r_language_server/init.lua @@ -51,7 +51,6 @@ languageserver::run(); root_dir = root_dir, homepage = "https://github.com/REditorSupport/languageserver", languages = { "R" }, - async = true, ---@param ctx InstallContext installer = function(ctx) ctx.spawn.R { diff --git a/lua/nvim-lsp-installer/servers/reason_ls/init.lua b/lua/nvim-lsp-installer/servers/reason_ls/init.lua index ceca2612..322d78b4 100644 --- a/lua/nvim-lsp-installer/servers/reason_ls/init.lua +++ b/lua/nvim-lsp-installer/servers/reason_ls/init.lua @@ -13,7 +13,6 @@ return function(name, root_dir) root_dir = root_dir, languages = { "reason" }, homepage = "https://github.com/jaredly/reason-language-server", - async = true, ---@param ctx InstallContext installer = function(ctx) local archive_name = coalesce( diff --git a/lua/nvim-lsp-installer/servers/remark_ls/init.lua b/lua/nvim-lsp-installer/servers/remark_ls/init.lua index acc7c2f3..3cedbab0 100644 --- a/lua/nvim-lsp-installer/servers/remark_ls/init.lua +++ b/lua/nvim-lsp-installer/servers/remark_ls/init.lua @@ -8,7 +8,6 @@ return function(name, root_dir) homepage = "https://github.com/remarkjs/remark-language-server", languages = { "markdown" }, installer = npm.packages { "remark-language-server" }, - async = true, default_options = { cmd_env = npm.env(root_dir), }, diff --git a/lua/nvim-lsp-installer/servers/rescriptls/init.lua b/lua/nvim-lsp-installer/servers/rescriptls/init.lua index d8a13231..673ec450 100644 --- a/lua/nvim-lsp-installer/servers/rescriptls/init.lua +++ b/lua/nvim-lsp-installer/servers/rescriptls/init.lua @@ -8,7 +8,6 @@ return function(name, root_dir) root_dir = root_dir, languages = { "rescript" }, homepage = "https://github.com/rescript-lang/rescript-vscode", - async = true, installer = function() github.unzip_release_file({ repo = "rescript-lang/rescript-vscode", diff --git a/lua/nvim-lsp-installer/servers/rnix/init.lua b/lua/nvim-lsp-installer/servers/rnix/init.lua index d552b11c..a79cec88 100644 --- a/lua/nvim-lsp-installer/servers/rnix/init.lua +++ b/lua/nvim-lsp-installer/servers/rnix/init.lua @@ -7,7 +7,6 @@ return function(name, root_dir) root_dir = root_dir, languages = { "nix" }, homepage = "https://github.com/nix-community/rnix-lsp", - async = true, installer = cargo.crate "rnix-lsp", default_options = { cmd_env = cargo.env(root_dir), diff --git a/lua/nvim-lsp-installer/servers/robotframework_ls/init.lua b/lua/nvim-lsp-installer/servers/robotframework_ls/init.lua index c7748406..b890d6fb 100644 --- a/lua/nvim-lsp-installer/servers/robotframework_ls/init.lua +++ b/lua/nvim-lsp-installer/servers/robotframework_ls/init.lua @@ -8,7 +8,6 @@ return function(name, root_dir) installer = pip3.packages { "robotframework-lsp" }, languages = { "robot" }, homepage = "https://github.com/robocorp/robotframework-lsp", - async = true, default_options = { cmd_env = pip3.env(root_dir), }, diff --git a/lua/nvim-lsp-installer/servers/rome/init.lua b/lua/nvim-lsp-installer/servers/rome/init.lua index aa0613a0..c664ca2c 100644 --- a/lua/nvim-lsp-installer/servers/rome/init.lua +++ b/lua/nvim-lsp-installer/servers/rome/init.lua @@ -15,7 +15,6 @@ return function(name, root_dir) end) npm.install({ "rome" }).with_receipt() end, - async = true, default_options = { cmd_env = npm.env(root_dir), }, diff --git a/lua/nvim-lsp-installer/servers/rust_analyzer/init.lua b/lua/nvim-lsp-installer/servers/rust_analyzer/init.lua index 56acc3b5..2cb2210d 100644 --- a/lua/nvim-lsp-installer/servers/rust_analyzer/init.lua +++ b/lua/nvim-lsp-installer/servers/rust_analyzer/init.lua @@ -13,7 +13,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://rust-analyzer.github.io", languages = { "rust" }, - async = true, installer = function() local libc = platform.get_libc() diff --git a/lua/nvim-lsp-installer/servers/salt_ls/init.lua b/lua/nvim-lsp-installer/servers/salt_ls/init.lua index f8d27a7e..bfc74069 100644 --- a/lua/nvim-lsp-installer/servers/salt_ls/init.lua +++ b/lua/nvim-lsp-installer/servers/salt_ls/init.lua @@ -7,7 +7,6 @@ return function(name, root_dir) root_dir = root_dir, languages = { "sls" }, homepage = "https://github.com/dcermak/salt-lsp", - async = true, installer = pip3.packages { "salt-lsp" }, default_options = { cmd_env = pip3.env(root_dir), diff --git a/lua/nvim-lsp-installer/servers/scry/init.lua b/lua/nvim-lsp-installer/servers/scry/init.lua index 43a2ccd6..1f8b8387 100644 --- a/lua/nvim-lsp-installer/servers/scry/init.lua +++ b/lua/nvim-lsp-installer/servers/scry/init.lua @@ -10,7 +10,6 @@ return function(name, root_dir) root_dir = root_dir, languages = { "crystal" }, homepage = "https://github.com/crystal-lang-tools/scry", - async = true, ---@param ctx InstallContext installer = function(ctx) std.ensure_executable("crystal", { diff --git a/lua/nvim-lsp-installer/servers/serve_d/init.lua b/lua/nvim-lsp-installer/servers/serve_d/init.lua index bbb7169c..8e9810fc 100644 --- a/lua/nvim-lsp-installer/servers/serve_d/init.lua +++ b/lua/nvim-lsp-installer/servers/serve_d/init.lua @@ -12,7 +12,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://github.com/Pure-D/serve-d", languages = { "d" }, - async = true, installer = function() local repo = "Pure-D/serve-d" platform.when { diff --git a/lua/nvim-lsp-installer/servers/slint_lsp/init.lua b/lua/nvim-lsp-installer/servers/slint_lsp/init.lua index 877adf12..be255948 100644 --- a/lua/nvim-lsp-installer/servers/slint_lsp/init.lua +++ b/lua/nvim-lsp-installer/servers/slint_lsp/init.lua @@ -10,7 +10,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://slint-ui.com/", languages = { "slint" }, - async = true, installer = function() local repo = "slint-ui/slint" platform.when { diff --git a/lua/nvim-lsp-installer/servers/solang/init.lua b/lua/nvim-lsp-installer/servers/solang/init.lua index 8a382cf3..ce86d9f3 100644 --- a/lua/nvim-lsp-installer/servers/solang/init.lua +++ b/lua/nvim-lsp-installer/servers/solang/init.lua @@ -53,7 +53,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://solang.readthedocs.io/en/latest/", languages = { "solidity" }, - async = true, ---@param ctx InstallContext installer = function(ctx) ctx:run_concurrently { download_solang, download_llvm } diff --git a/lua/nvim-lsp-installer/servers/solargraph/init.lua b/lua/nvim-lsp-installer/servers/solargraph/init.lua index e03a29f1..0a6f1fe9 100644 --- a/lua/nvim-lsp-installer/servers/solargraph/init.lua +++ b/lua/nvim-lsp-installer/servers/solargraph/init.lua @@ -7,7 +7,6 @@ return function(name, root_dir) root_dir = root_dir, languages = { "ruby" }, homepage = "https://solargraph.org", - async = true, installer = gem.packages { "solargraph" }, default_options = { cmd_env = gem.env(root_dir), diff --git a/lua/nvim-lsp-installer/servers/solc/init.lua b/lua/nvim-lsp-installer/servers/solc/init.lua index 941399ae..c84fa69d 100644 --- a/lua/nvim-lsp-installer/servers/solc/init.lua +++ b/lua/nvim-lsp-installer/servers/solc/init.lua @@ -13,7 +13,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://github.com/ethereum/solidity", languages = { "solidity" }, - async = true, installer = function() local source = github.release_file { repo = "ethereum/solidity", diff --git a/lua/nvim-lsp-installer/servers/solidity_ls/init.lua b/lua/nvim-lsp-installer/servers/solidity_ls/init.lua index 577b5c35..1f8b6e71 100644 --- a/lua/nvim-lsp-installer/servers/solidity_ls/init.lua +++ b/lua/nvim-lsp-installer/servers/solidity_ls/init.lua @@ -8,7 +8,6 @@ return function(name, root_dir) languages = { "solidity" }, homepage = "https://github.com/edag94/vscode-solidity", installer = npm.packages { "solidity-language-server" }, - async = true, default_options = { cmd_env = npm.env(root_dir), }, diff --git a/lua/nvim-lsp-installer/servers/sorbet/init.lua b/lua/nvim-lsp-installer/servers/sorbet/init.lua index 3b0ab025..8095f289 100644 --- a/lua/nvim-lsp-installer/servers/sorbet/init.lua +++ b/lua/nvim-lsp-installer/servers/sorbet/init.lua @@ -7,7 +7,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://sorbet.org/", languages = { "ruby" }, - async = true, installer = gem.packages { "sorbet" }, default_options = { cmd_env = gem.env(root_dir), diff --git a/lua/nvim-lsp-installer/servers/sourcekit/init.lua b/lua/nvim-lsp-installer/servers/sourcekit/init.lua index d55148b5..7485701d 100644 --- a/lua/nvim-lsp-installer/servers/sourcekit/init.lua +++ b/lua/nvim-lsp-installer/servers/sourcekit/init.lua @@ -7,7 +7,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://github.com/apple/sourcekit-lsp", languages = { "swift" }, - async = true, installer = std.system_executable("sourcekit-lsp", { help_url = "https://github.com/apple/sourcekit-lsp" }), default_options = {}, } diff --git a/lua/nvim-lsp-installer/servers/sourcery/init.lua b/lua/nvim-lsp-installer/servers/sourcery/init.lua index c4efeaf6..98d3dff9 100644 --- a/lua/nvim-lsp-installer/servers/sourcery/init.lua +++ b/lua/nvim-lsp-installer/servers/sourcery/init.lua @@ -7,7 +7,6 @@ return function(name, root_dir) root_dir = root_dir, languages = { "python" }, homepage = "https://docs.sourcery.ai/", - async = true, installer = pip3.packages { "sourcery-cli" }, default_options = { cmd_env = pip3.env(root_dir), diff --git a/lua/nvim-lsp-installer/servers/spectral/init.lua b/lua/nvim-lsp-installer/servers/spectral/init.lua index 8b174d22..c974ee7f 100644 --- a/lua/nvim-lsp-installer/servers/spectral/init.lua +++ b/lua/nvim-lsp-installer/servers/spectral/init.lua @@ -9,7 +9,6 @@ return function(name, root_dir) root_dir = root_dir, languages = { "openapi", "asyncapi" }, homepage = "https://stoplight.io/open-source/spectral/", - async = true, ---@param ctx InstallContext installer = function(ctx) git.clone({ "https://github.com/stoplightio/vscode-spectral" }).with_receipt() diff --git a/lua/nvim-lsp-installer/servers/sqlls/init.lua b/lua/nvim-lsp-installer/servers/sqlls/init.lua index 3e562608..dd818b82 100644 --- a/lua/nvim-lsp-installer/servers/sqlls/init.lua +++ b/lua/nvim-lsp-installer/servers/sqlls/init.lua @@ -8,7 +8,6 @@ return function(name, root_dir) languages = { "sql" }, homepage = "https://github.com/joe-re/sql-language-server", installer = npm.packages { "sql-language-server" }, - async = true, default_options = { cmd_env = npm.env(root_dir), }, diff --git a/lua/nvim-lsp-installer/servers/sqls/init.lua b/lua/nvim-lsp-installer/servers/sqls/init.lua index 9cad121b..f067bc0e 100644 --- a/lua/nvim-lsp-installer/servers/sqls/init.lua +++ b/lua/nvim-lsp-installer/servers/sqls/init.lua @@ -7,7 +7,6 @@ return function(name, root_dir) root_dir = root_dir, languages = { "sql" }, homepage = "https://github.com/lighttiger2505/sqls", - async = true, installer = go.packages { "github.com/lighttiger2505/sqls" }, default_options = { cmd_env = go.env(root_dir), diff --git a/lua/nvim-lsp-installer/servers/stylelint_lsp/init.lua b/lua/nvim-lsp-installer/servers/stylelint_lsp/init.lua index 6d52b3b2..a8e84e39 100644 --- a/lua/nvim-lsp-installer/servers/stylelint_lsp/init.lua +++ b/lua/nvim-lsp-installer/servers/stylelint_lsp/init.lua @@ -8,7 +8,6 @@ return function(name, root_dir) homepage = "https://github.com/bmatcuk/stylelint-lsp", languages = { "stylelint" }, installer = npm.packages { "stylelint-lsp" }, - async = true, default_options = { cmd_env = npm.env(root_dir), }, diff --git a/lua/nvim-lsp-installer/servers/sumneko_lua/init.lua b/lua/nvim-lsp-installer/servers/sumneko_lua/init.lua index 943b41f0..49d847bd 100644 --- a/lua/nvim-lsp-installer/servers/sumneko_lua/init.lua +++ b/lua/nvim-lsp-installer/servers/sumneko_lua/init.lua @@ -13,7 +13,6 @@ return function(name, root_dir) root_dir = root_dir, languages = { "lua" }, homepage = "https://github.com/sumneko/lua-language-server", - async = true, installer = function() github.unzip_release_file({ repo = "sumneko/vscode-lua", diff --git a/lua/nvim-lsp-installer/servers/svelte/init.lua b/lua/nvim-lsp-installer/servers/svelte/init.lua index 3cc545b0..f39c5fb0 100644 --- a/lua/nvim-lsp-installer/servers/svelte/init.lua +++ b/lua/nvim-lsp-installer/servers/svelte/init.lua @@ -8,7 +8,6 @@ return function(name, root_dir) languages = { "svelte" }, homepage = "https://github.com/sveltejs/language-tools", installer = npm.packages { "svelte-language-server" }, - async = true, default_options = { cmd_env = npm.env(root_dir), }, diff --git a/lua/nvim-lsp-installer/servers/svls/init.lua b/lua/nvim-lsp-installer/servers/svls/init.lua index 58a46432..a8e59ff4 100644 --- a/lua/nvim-lsp-installer/servers/svls/init.lua +++ b/lua/nvim-lsp-installer/servers/svls/init.lua @@ -7,7 +7,6 @@ return function(name, root_dir) root_dir = root_dir, languages = { "systemverilog" }, homepage = "https://github.com/dalance/svls", - async = true, installer = cargo.crate "svls", default_options = { cmd_env = cargo.env(root_dir), diff --git a/lua/nvim-lsp-installer/servers/tailwindcss/init.lua b/lua/nvim-lsp-installer/servers/tailwindcss/init.lua index d24948b0..fa7caa8f 100644 --- a/lua/nvim-lsp-installer/servers/tailwindcss/init.lua +++ b/lua/nvim-lsp-installer/servers/tailwindcss/init.lua @@ -7,7 +7,6 @@ return function(name, root_dir) root_dir = root_dir, languages = { "tailwind" }, installer = npm.packages { "@tailwindcss/language-server" }, - async = true, default_options = { cmd_env = npm.env(root_dir), }, diff --git a/lua/nvim-lsp-installer/servers/taplo/init.lua b/lua/nvim-lsp-installer/servers/taplo/init.lua index 0d584e6b..a93c1a0f 100644 --- a/lua/nvim-lsp-installer/servers/taplo/init.lua +++ b/lua/nvim-lsp-installer/servers/taplo/init.lua @@ -7,7 +7,6 @@ return function(name, root_dir) root_dir = root_dir, languages = { "toml" }, homepage = "https://taplo.tamasfe.dev/lsp/", - async = true, installer = cargo.crate "taplo-cli", default_options = { cmd_env = cargo.env(root_dir), diff --git a/lua/nvim-lsp-installer/servers/terraformls/init.lua b/lua/nvim-lsp-installer/servers/terraformls/init.lua index 4cc26162..94981593 100644 --- a/lua/nvim-lsp-installer/servers/terraformls/init.lua +++ b/lua/nvim-lsp-installer/servers/terraformls/init.lua @@ -12,7 +12,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://github.com/hashicorp/terraform-ls", languages = { "terraform" }, - async = true, installer = function() github.unzip_release_file({ repo = "hashicorp/terraform-ls", diff --git a/lua/nvim-lsp-installer/servers/texlab/init.lua b/lua/nvim-lsp-installer/servers/texlab/init.lua index 5adf0264..0d5e1e7b 100644 --- a/lua/nvim-lsp-installer/servers/texlab/init.lua +++ b/lua/nvim-lsp-installer/servers/texlab/init.lua @@ -12,7 +12,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://github.com/latex-lsp/texlab", languages = { "latex" }, - async = true, installer = function() local repo = "latex-lsp/texlab" platform.when { diff --git a/lua/nvim-lsp-installer/servers/tflint/init.lua b/lua/nvim-lsp-installer/servers/tflint/init.lua index 65a04dec..0556679a 100644 --- a/lua/nvim-lsp-installer/servers/tflint/init.lua +++ b/lua/nvim-lsp-installer/servers/tflint/init.lua @@ -14,7 +14,6 @@ return function(name, root_dir) root_dir = root_dir, languages = { "terraform" }, homepage = "https://github.com/terraform-linters/tflint", - async = true, installer = function() github.unzip_release_file({ repo = "terraform-linters/tflint", diff --git a/lua/nvim-lsp-installer/servers/theme_check/init.lua b/lua/nvim-lsp-installer/servers/theme_check/init.lua index e2f402e5..e1bd3a3e 100644 --- a/lua/nvim-lsp-installer/servers/theme_check/init.lua +++ b/lua/nvim-lsp-installer/servers/theme_check/init.lua @@ -7,7 +7,6 @@ return function(name, root_dir) root_dir = root_dir, languages = { "liquid" }, homepage = "https://github.com/Shopify/theme-check", - async = true, installer = gem.packages { "theme-check" }, default_options = { cmd_env = gem.env(root_dir), diff --git a/lua/nvim-lsp-installer/servers/tsserver/init.lua b/lua/nvim-lsp-installer/servers/tsserver/init.lua index 22091418..d9e2571e 100644 --- a/lua/nvim-lsp-installer/servers/tsserver/init.lua +++ b/lua/nvim-lsp-installer/servers/tsserver/init.lua @@ -8,7 +8,6 @@ return function(name, root_dir) languages = { "typescript", "javascript" }, homepage = "https://github.com/typescript-language-server/typescript-language-server", installer = npm.packages { "typescript-language-server", "typescript" }, - async = true, default_options = { cmd_env = npm.env(root_dir), }, diff --git a/lua/nvim-lsp-installer/servers/vala_ls/init.lua b/lua/nvim-lsp-installer/servers/vala_ls/init.lua index 37d55d3c..dd1e04d8 100644 --- a/lua/nvim-lsp-installer/servers/vala_ls/init.lua +++ b/lua/nvim-lsp-installer/servers/vala_ls/init.lua @@ -10,7 +10,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://wiki.gnome.org/Projects/Vala", languages = { "vala" }, - async = true, ---@param ctx InstallContext installer = function(ctx) std.ensure_executable("meson", { help_url = "https://mesonbuild.com/Getting-meson.html" }) diff --git a/lua/nvim-lsp-installer/servers/verible/init.lua b/lua/nvim-lsp-installer/servers/verible/init.lua index 396fc6be..9955ac73 100644 --- a/lua/nvim-lsp-installer/servers/verible/init.lua +++ b/lua/nvim-lsp-installer/servers/verible/init.lua @@ -13,7 +13,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://chipsalliance.github.io/verible/", languages = { "systemverilog", "verilog" }, - async = true, ---@param ctx InstallContext installer = function(ctx) local repo = "chipsalliance/verible" diff --git a/lua/nvim-lsp-installer/servers/vimls/init.lua b/lua/nvim-lsp-installer/servers/vimls/init.lua index b753e92a..ab5e72dc 100644 --- a/lua/nvim-lsp-installer/servers/vimls/init.lua +++ b/lua/nvim-lsp-installer/servers/vimls/init.lua @@ -8,7 +8,6 @@ return function(name, root_dir) languages = { "vim" }, homepage = "https://github.com/iamcco/vim-language-server", installer = npm.packages { "vim-language-server" }, - async = true, default_options = { cmd_env = npm.env(root_dir), }, diff --git a/lua/nvim-lsp-installer/servers/volar/init.lua b/lua/nvim-lsp-installer/servers/volar/init.lua index 4bdda7b0..0c3113a9 100644 --- a/lua/nvim-lsp-installer/servers/volar/init.lua +++ b/lua/nvim-lsp-installer/servers/volar/init.lua @@ -26,7 +26,6 @@ return function(name, root_dir) homepage = "https://github.com/johnsoncodehk/volar", languages = { "vue" }, installer = npm.packages { "@volar/vue-language-server", "typescript" }, - async = true, default_options = { cmd_env = npm.env(root_dir), on_new_config = function(new_config, new_root_dir) diff --git a/lua/nvim-lsp-installer/servers/vscode-langservers-extracted/init.lua b/lua/nvim-lsp-installer/servers/vscode-langservers-extracted/init.lua index 22c2b045..a8441328 100644 --- a/lua/nvim-lsp-installer/servers/vscode-langservers-extracted/init.lua +++ b/lua/nvim-lsp-installer/servers/vscode-langservers-extracted/init.lua @@ -9,7 +9,6 @@ return function(languages) languages = languages, root_dir = root_dir, installer = npm.packages { "vscode-langservers-extracted" }, - async = true, default_options = { cmd_env = npm.env(root_dir), }, diff --git a/lua/nvim-lsp-installer/servers/vuels/init.lua b/lua/nvim-lsp-installer/servers/vuels/init.lua index 4b630142..5d403953 100644 --- a/lua/nvim-lsp-installer/servers/vuels/init.lua +++ b/lua/nvim-lsp-installer/servers/vuels/init.lua @@ -8,7 +8,6 @@ return function(name, root_dir) languages = { "vue" }, homepage = "https://github.com/vuejs/vetur", installer = npm.packages { "vls" }, - async = true, default_options = { cmd_env = npm.env(root_dir), }, diff --git a/lua/nvim-lsp-installer/servers/yamlls/init.lua b/lua/nvim-lsp-installer/servers/yamlls/init.lua index bbd94e0c..0cfb3e41 100644 --- a/lua/nvim-lsp-installer/servers/yamlls/init.lua +++ b/lua/nvim-lsp-installer/servers/yamlls/init.lua @@ -8,7 +8,6 @@ return function(name, root_dir) languages = { "yaml" }, homepage = "https://github.com/redhat-developer/yaml-language-server", installer = npm.packages { "yaml-language-server" }, - async = true, default_options = { cmd_env = npm.env(root_dir), }, diff --git a/lua/nvim-lsp-installer/servers/zeta_note/init.lua b/lua/nvim-lsp-installer/servers/zeta_note/init.lua index 3db58620..f0c01dc9 100644 --- a/lua/nvim-lsp-installer/servers/zeta_note/init.lua +++ b/lua/nvim-lsp-installer/servers/zeta_note/init.lua @@ -13,7 +13,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://github.com/artempyanykh/zeta-note", languages = { "markdown" }, - async = true, installer = function() local source = github.release_file { repo = "artempyanykh/zeta-note", diff --git a/lua/nvim-lsp-installer/servers/zk/init.lua b/lua/nvim-lsp-installer/servers/zk/init.lua index 6c8825eb..15163ace 100644 --- a/lua/nvim-lsp-installer/servers/zk/init.lua +++ b/lua/nvim-lsp-installer/servers/zk/init.lua @@ -11,7 +11,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://github.com/mickael-menu/zk", languages = { "markdown" }, - async = true, installer = function() local repo = "mickael-menu/zk" platform.when { diff --git a/lua/nvim-lsp-installer/servers/zls/init.lua b/lua/nvim-lsp-installer/servers/zls/init.lua index c902f4aa..1d1ef720 100644 --- a/lua/nvim-lsp-installer/servers/zls/init.lua +++ b/lua/nvim-lsp-installer/servers/zls/init.lua @@ -14,7 +14,6 @@ return function(name, root_dir) root_dir = root_dir, homepage = "https://github.com/zigtools/zls", languages = { "zig" }, - async = true, ---@param ctx InstallContext installer = function(ctx) local asset_file = coalesce( diff --git a/tests/helpers/lua/test_helpers.lua b/tests/helpers/lua/test_helpers.lua index a9a2426f..3c753929 100644 --- a/tests/helpers/lua/test_helpers.lua +++ b/tests/helpers/lua/test_helpers.lua @@ -38,7 +38,6 @@ function ServerGenerator(opts) languages = { "dummylang" }, root_dir = server.get_server_root_path(name), homepage = "https://dummylang.org", - async = true, installer = function(ctx) ctx.stdio_sink.stdout "Installing dummy!\n" end, |
