couldn't create connection to server in VS Code
Hi,
I was going to try the vscode extension but I got the following error :
rstfilter extension client: couldn't create connection to server.
Launching server using command rstfilter-lsp failed. Error: spawn rstfilter-lsp ENOENT
I did that:
- installed the extension
- installed the gem
- restart vscode and rails server
ruby version: 2.6.9 rails version: 5.2.7
Thanks in advance for your help
Thank you to trying it.
Did you install rstfilter by gem install or bundle install? The latter can install rstfilter in the local directory and rstfilter-lsp command is not installed into your system. Could you try rstfilter-lsp on the terminal?
rstfilter-lsp seems to work in my terminal :
nicolas@mbp-nicolas echosciences % rstfilter-lsp
warning: parser/current is loading parser/ruby26, which recognizes2.6.10-compliant syntax, but you are running 2.6.9.
Please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.
wait from #<IO:<STDIN>
It seems strange that I can't quit it, I have to kill my terminal tab.
I see. rstfilter-lsp keeps connection with STDIN/OUT.
It's strange that it should be quit with Ctrl-C because it's waiting with STDIN.gets.
https://github.com/ko1/rstfilter/blob/main/lib/rstfilter/lsp/handler.rb#L64
and original problem I couldn't solve... One assumption is
- You are using rbenv
- VSCode was launched from desktop (mac?) and VSCode launches rstfilter on non-rbenv environment.
To check the situation, you can launch VSCode from rbenv enabled terminal (like code app_dir/).
Ah,
https://github.com/ko1/rstfilter/blob/main/lib/rstfilter/lsp/handler.rb#L37
Interrupt was rescued.
I'm using rvm.
I have the same problem if I lunch vscode from the terminal on the project with code ..
I see, so I have no idea more...
No problem, anyway thanks for your help
Maybe someone will find and resolve ths issue :)
Have a nice day