getting version in health check causes tailwindcss lsp to hang
sadguitarius opened this issue · 7 comments
Description
Somehow the version check in :checkhealth
is causing Neovim to hang for a minute or so before producing output when trying to get the version for tailwindcss LSP. The whole program locks up and won't allow any user input until the version check returns. This could also be happening for other language servers, but I've only noticed this one so far. I tried reducing the timeout in try_get_cmd_output
and it looks like it's working normally with the value set to 100 or so. No idea why the value of 1000 is causing the hang.
I'm on Windows btw
Thanks. What about 500? typescript-language-server --version
was too slow when I tried 100.
What arg does tailwindcss take to print its version?
Around 300 is where it starts to fail. I actually have no idea how to get it to print the version. It just prints a bunch of JSON garbage as if it's treating the argument like input to the LSP I guess.
https://www.npmjs.com/package/@tailwindcss/language-server suggests there is no way :/
Usage: tailwindcss-language-server [options]
Options:
--stdio use stdio
--node-ipc use node-ipc
--socket=<port> use socket
Ah well that's a strange choice. So the solution would be either to
- specifically exclude tailwindcss from the version search
- change the timeout
- get the developers of the language server to add a version command
- figure out why this is actually causing the whole program to freeze
Right? 4 sounds like the hardest but probably the best in the long run, since this may be a sign of a deeper issue, but maybe a band-aid is better so nobody has to spend too much time on this right now. Any ideas?
Should be fixed by #3388 . If it still hangs forever, that's a bug we need to fix here.
If it's fixed, the version report will show "failed to get version".
Looks good here, thank you!