diff options
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/nvim-lsp-installer/dispatcher.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lua/nvim-lsp-installer/dispatcher.lua b/lua/nvim-lsp-installer/dispatcher.lua index 6331bd9c..7a53d17d 100644 --- a/lua/nvim-lsp-installer/dispatcher.lua +++ b/lua/nvim-lsp-installer/dispatcher.lua @@ -1,10 +1,15 @@ +local notify = require("nvim-lsp-installer.notify") + local M = {} local registered_callbacks = {} M.dispatch_server_ready = function(server) for _, callback in pairs(registered_callbacks) do - callback(server) + local ok, err = pcall(callback, server) + if not ok then + notify(tostring(err), vim.log.levels.ERROR) + end end end |
