aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-lsp-installer/installers/gem.lua
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2021-10-25 14:55:47 +0200
committerGitHub <noreply@github.com>2021-10-25 14:55:47 +0200
commitf60d78a29fbe772e0724ee0853a13894b9765fdf (patch)
treeadf8fd822587d779c5b90d5ed30987a982fd497e /lua/nvim-lsp-installer/installers/gem.lua
parentfix :LspPrintInstalled (diff)
downloadmason-f60d78a29fbe772e0724ee0853a13894b9765fdf.tar
mason-f60d78a29fbe772e0724ee0853a13894b9765fdf.tar.gz
mason-f60d78a29fbe772e0724ee0853a13894b9765fdf.tar.bz2
mason-f60d78a29fbe772e0724ee0853a13894b9765fdf.tar.lz
mason-f60d78a29fbe772e0724ee0853a13894b9765fdf.tar.xz
mason-f60d78a29fbe772e0724ee0853a13894b9765fdf.tar.zst
mason-f60d78a29fbe772e0724ee0853a13894b9765fdf.zip
add proper emmylua annotations (#196)
Diffstat (limited to 'lua/nvim-lsp-installer/installers/gem.lua')
-rw-r--r--lua/nvim-lsp-installer/installers/gem.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/lua/nvim-lsp-installer/installers/gem.lua b/lua/nvim-lsp-installer/installers/gem.lua
index 091cda27..331be055 100644
--- a/lua/nvim-lsp-installer/installers/gem.lua
+++ b/lua/nvim-lsp-installer/installers/gem.lua
@@ -9,12 +9,14 @@ local M = {}
local gem = platform.is_win and "gem.cmd" or "gem"
+---@param packages string[] @The Gem packages to install. The first item in this list will be the recipient of the server version, should the user request a specific one.
function M.packages(packages)
return installers.pipe {
std.ensure_executables {
{ "ruby", "ruby was not found in path, refer to https://wiki.openstack.org/wiki/RubyGems." },
{ "gem", "gem was not found in path, refer to https://wiki.openstack.org/wiki/RubyGems." },
},
+ ---@type ServerInstallerFunction
function(server, callback, context)
local pkgs = Data.list_copy(packages or {})
if context.requested_server_version then
@@ -38,10 +40,13 @@ function M.packages(packages)
}
end
+---@param root_dir string @The directory to resolve the executable from.
+---@param executable string
function M.executable(root_dir, executable)
return path.concat { root_dir, "bin", executable }
end
+---@param root_dir string
function M.env(root_dir)
return {
GEM_HOME = root_dir,