aboutsummaryrefslogtreecommitdiffstats
path: root/lua/mason-lspconfig/init.lua
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2022-07-07 01:59:09 +0200
committerWilliam Boman <william@redwill.se>2022-07-07 01:59:09 +0200
commite94d3e0670e6f524e306a811d77aa12d138a8762 (patch)
treef809f739927a647cd48f2bcf595afdfd8c1dbc1f /lua/mason-lspconfig/init.lua
parentfeat(ui): implement keybind to update all outdated packages (diff)
downloadmason-e94d3e0670e6f524e306a811d77aa12d138a8762.tar
mason-e94d3e0670e6f524e306a811d77aa12d138a8762.tar.gz
mason-e94d3e0670e6f524e306a811d77aa12d138a8762.tar.bz2
mason-e94d3e0670e6f524e306a811d77aa12d138a8762.tar.lz
mason-e94d3e0670e6f524e306a811d77aa12d138a8762.tar.xz
mason-e94d3e0670e6f524e306a811d77aa12d138a8762.tar.zst
mason-e94d3e0670e6f524e306a811d77aa12d138a8762.zip
chore: s/package/pkg/
As to not accidentally access the actual package global 😬
Diffstat (limited to 'lua/mason-lspconfig/init.lua')
-rw-r--r--lua/mason-lspconfig/init.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/lua/mason-lspconfig/init.lua b/lua/mason-lspconfig/init.lua
index b81bef70..ad177be6 100644
--- a/lua/mason-lspconfig/init.lua
+++ b/lua/mason-lspconfig/init.lua
@@ -10,9 +10,9 @@ local M = {}
---@param lspconfig_server_name string
function M.resolve_package(lspconfig_server_name)
return Optional.of_nilable(server_mapping.lspconfig_to_package[lspconfig_server_name]):map(function(package_name)
- local ok, package = pcall(require, ("mason.packages.%s"):format(package_name))
+ local ok, pkg = pcall(require, ("mason.packages.%s"):format(package_name))
if ok then
- return package
+ return pkg
end
end)
end