diff options
| -rw-r--r-- | doc/nvim-lsp-installer.txt | 6 | ||||
| -rw-r--r-- | 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 |
