From 35d08bb4e91cda16778f0cf887291e2f3dd6f6a8 Mon Sep 17 00:00:00 2001 From: William Boman Date: Wed, 17 Nov 2021 16:15:48 +0100 Subject: server: add {version} param to server:install() --- doc/nvim-lsp-installer.txt | 6 +++++- lua/nvim-lsp-installer/server.lua | 5 +++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/doc/nvim-lsp-installer.txt b/doc/nvim-lsp-installer.txt index 1d736e52..e8666391 100644 --- a/doc/nvim-lsp-installer.txt +++ b/doc/nvim-lsp-installer.txt @@ -379,9 +379,13 @@ class: Server - is_installed() Returns {true} is server is installed, else returns {false}. - - install() + - install({version}) Installs this instance of an LSP server. + Parameters: ~ + {version} (string|nil) The version of the server to + install. If nil, the latest version will be installed. + - uninstall() Uninstalls this instance of an LSP server. diff --git a/lua/nvim-lsp-installer/server.lua b/lua/nvim-lsp-installer/server.lua index cd04cb51..aeaa5ba2 100644 --- a/lua/nvim-lsp-installer/server.lua +++ b/lua/nvim-lsp-installer/server.lua @@ -117,8 +117,9 @@ function M.Server:is_installed() end ---Queues the server to be asynchronously installed. -function M.Server:install() - status_win().install_server(self) +---@param version string|nil @The version of the server to install. If nil, the latest version will be installed. +function M.Server:install(version) + status_win().install_server(self, version) end ---@param context ServerInstallContext -- cgit v1.2.3-70-g09d2