Skip to content

Commit

Permalink
feat: better feedback when auto installing servers (#51)
Browse files Browse the repository at this point in the history
Closes #48.
  • Loading branch information
williamboman committed Sep 7, 2022
1 parent 601c384 commit 3592723
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lua/mason-lspconfig/lspconfig_hook.lua
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,12 @@ return function()
end
elseif should_auto_install(config.name) then
local pkg = registry.get_package(pkg_name)
vim.notify(("[mason-lspconfig] automatically installing %s"):format(pkg.name))
pkg:install():once(
"closed",
vim.schedule_wrap(function()
if pkg:is_installed() then
vim.notify(("[mason-lspconfig] %s was automatically installed"):format(pkg.name))
-- reload config
require("lspconfig")[config.name].setup(config)
end
Expand Down

0 comments on commit 3592723

Please sign in to comment.