neovim / nvim-lspconfig

Quickstart configs for Nvim LSP
Apache License 2.0
10.46k stars 2.06k forks source link

Can't inspect LspInstall errors #196

Closed dlukes closed 4 years ago

dlukes commented 4 years ago

Because the sh utility function always closes the output buffer:

https://github.com/neovim/nvim-lsp/blob/39b743b9b36be26a5e58278d7608fe456a0ad3f8/lua/nvim_lsp/util.lua#L430-L432

Maybe only call bwipeout if the shell script exited successfully? Or if that's too complicated, leave it around for the user to delete? It's better than hiding useful feedback on error imho :)

tjdevries commented 4 years ago

Checking the exit code would be a good option here. Would you be interested in making the PR? I think it's possible to figure out how to check the exit code from these docs: https://github.com/luvit/luv/blob/master/docs.md

If not, it'd be a good first issue for someone else. Thanks for reporting.

dlukes commented 4 years ago

Thanks for the pointer! I would've tried a PR but I wasn't really sure how to get at that exit code, I helpgrepped the docs for spawn but couldn't find anything relevant :) I'll have a look at that link and see what I can do.

tjdevries commented 4 years ago

No problem -- I'm pretty sure that vim.loop is just the loop from luv which is built on libuv. I could be wrong about that, but so far it's worked for every problem I've encountered with it haha :)

dlukes commented 4 years ago

Addressed by #208.