aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2021-11-17 16:15:48 +0100
committerWilliam Boman <william@redwill.se>2021-11-17 16:15:48 +0100
commit35d08bb4e91cda16778f0cf887291e2f3dd6f6a8 (patch)
treecf46bc70997e71fea724ae8c105c33400d1b4808
parentInclude jsonnet-language-server installation (#240) (diff)
downloadmason-35d08bb4e91cda16778f0cf887291e2f3dd6f6a8.tar
mason-35d08bb4e91cda16778f0cf887291e2f3dd6f6a8.tar.gz
mason-35d08bb4e91cda16778f0cf887291e2f3dd6f6a8.tar.bz2
mason-35d08bb4e91cda16778f0cf887291e2f3dd6f6a8.tar.lz
mason-35d08bb4e91cda16778f0cf887291e2f3dd6f6a8.tar.xz
mason-35d08bb4e91cda16778f0cf887291e2f3dd6f6a8.tar.zst
mason-35d08bb4e91cda16778f0cf887291e2f3dd6f6a8.zip
server: add {version} param to server:install()
-rw-r--r--doc/nvim-lsp-installer.txt6
-rw-r--r--lua/nvim-lsp-installer/server.lua5
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