diff options
Diffstat (limited to 'lua/nvim-lsp-installer/installers/zx.lua')
| -rw-r--r-- | lua/nvim-lsp-installer/installers/zx.lua | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lua/nvim-lsp-installer/installers/zx.lua b/lua/nvim-lsp-installer/installers/zx.lua index 20ee9bb1..92027ef8 100644 --- a/lua/nvim-lsp-installer/installers/zx.lua +++ b/lua/nvim-lsp-installer/installers/zx.lua @@ -44,7 +44,7 @@ end function M.file(relpath) local script_path = path.realpath(relpath, 3) - return function (server, on_exit) + return function (server, callback) M.install_zx(function () vim.cmd [[new]] vim.fn.termopen(("set -e; %q %q"):format( @@ -52,7 +52,13 @@ function M.file(relpath) script_path ), { cwd = server._root_dir, - on_exit = on_exit + on_exit = function (_, exit_code) + if exit_code ~= 0 then + callback(false, ("Exit code was non-successful: %d"):format(exit_code)) + else + callback(true, nil) + end + end }) vim.cmd [[startinsert]] -- so that the buffer tails the term log nicely end, false) |
