-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description
Hi there,
My bashls wasn't running, so I ran :LspInfo
inside of Neovim with a shell file open, and got this back as part of the info:
version: `?` (Failed to get version) Tried:
`…/mason/bin/bash-language-server --version`
`…/mason/bin/bash-language-server -version`
`…/mason/bin/bash-language-server version`
`…/mason/bin/bash-language-server --help`
I found it's because the recipient is reading STDERR output too, and if there's anything coming through on STDERR then it chokes:
$ ./mason/bin/bash-language-server --version
5.4.2
(node:51440) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
This line is where the server is started:
I replaced:
cmd = { 'bash-language-server', 'start' },
with:
cmd = { 'sh', '-c', 'bash-language-server start 2>/dev/null' },
and it's fixed.
I'd put in a pull request but this is just a workaround and it'd probably be better if STDERR wasn't read (or was handled), but I've no idea about this codebase and any further effects this may have, so this is an FYI.
Regards,
iain
cescobaz
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working