aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-lsp-installer/servers/rust_analyzer/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/nvim-lsp-installer/servers/rust_analyzer/init.lua')
-rw-r--r--lua/nvim-lsp-installer/servers/rust_analyzer/init.lua14
1 files changed, 8 insertions, 6 deletions
diff --git a/lua/nvim-lsp-installer/servers/rust_analyzer/init.lua b/lua/nvim-lsp-installer/servers/rust_analyzer/init.lua
index 8fe0c740..c81e37b1 100644
--- a/lua/nvim-lsp-installer/servers/rust_analyzer/init.lua
+++ b/lua/nvim-lsp-installer/servers/rust_analyzer/init.lua
@@ -2,10 +2,9 @@ local server = require "nvim-lsp-installer.server"
local path = require "nvim-lsp-installer.path"
local platform = require "nvim-lsp-installer.platform"
local std = require "nvim-lsp-installer.installers.std"
+local context = require "nvim-lsp-installer.installers.context"
local Data = require "nvim-lsp-installer.data"
-local VERSION = "2021-06-28"
-
local target = Data.coalesce(
Data.when(
platform.is_mac,
@@ -35,10 +34,13 @@ return function(name, root_dir)
name = name,
root_dir = root_dir,
installer = {
- std.gunzip_remote(
- ("https://github.com/rust-analyzer/rust-analyzer/releases/download/%s/%s"):format(VERSION, target),
- platform.is_win and "rust-analyzer.exe" or "rust-analyzer"
- ),
+ context.github_release_file("rust-analyzer/rust-analyzer", target),
+ context.capture(function(ctx)
+ return std.gunzip_remote(
+ ctx.github_release_file,
+ platform.is_win and "rust-analyzer.exe" or "rust-analyzer"
+ )
+ end),
std.chmod("+x", { "rust-analyzer" }),
},
default_options = {