diff options
| author | William Boman <william@redwill.se> | 2021-09-29 13:48:39 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-29 13:48:39 +0200 |
| commit | e267fe517feaaf7a48323349e3775944db49c158 (patch) | |
| tree | 1c9d869d71c32b0d3b2f9304d9433dbb4ced9903 /lua/nvim-lsp-installer/servers/rescriptls/init.lua | |
| parent | fix stylua (#104) (diff) | |
| download | mason-e267fe517feaaf7a48323349e3775944db49c158.tar mason-e267fe517feaaf7a48323349e3775944db49c158.tar.gz mason-e267fe517feaaf7a48323349e3775944db49c158.tar.bz2 mason-e267fe517feaaf7a48323349e3775944db49c158.tar.lz mason-e267fe517feaaf7a48323349e3775944db49c158.tar.xz mason-e267fe517feaaf7a48323349e3775944db49c158.tar.zst mason-e267fe517feaaf7a48323349e3775944db49c158.zip | |
support installing specific version of language servers, defaults to latest (#106)
Diffstat (limited to 'lua/nvim-lsp-installer/servers/rescriptls/init.lua')
| -rw-r--r-- | lua/nvim-lsp-installer/servers/rescriptls/init.lua | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lua/nvim-lsp-installer/servers/rescriptls/init.lua b/lua/nvim-lsp-installer/servers/rescriptls/init.lua index 76baba6a..caec9d53 100644 --- a/lua/nvim-lsp-installer/servers/rescriptls/init.lua +++ b/lua/nvim-lsp-installer/servers/rescriptls/init.lua @@ -1,12 +1,20 @@ local server = require "nvim-lsp-installer.server" local path = require "nvim-lsp-installer.path" local std = require "nvim-lsp-installer.installers.std" +local context = require "nvim-lsp-installer.installers.context" return function(name, root_dir) return server.Server:new { name = name, root_dir = root_dir, - installer = std.unzip_remote "https://github.com/rescript-lang/rescript-vscode/releases/download/1.1.3/rescript-vscode-1.1.3.vsix", + installer = { + context.github_release_file("rescript-lang/rescript-vscode", function(version) + return ("rescript-vscode-%s.vsix"):format(version) + end), + context.capture(function(ctx) + return std.unzip_remote(ctx.github_release_file) + end), + }, default_options = { cmd = { "node", path.concat { root_dir, "extension", "server", "out", "server.js" }, "--stdio" }, }, |
