-
Notifications
You must be signed in to change notification settings - Fork 166
Possible to use this ext where rustup/rustc/cargo is provided by WSL? #144
Comments
Hm, piping stdio/stdout I believe microsoft/vscode#22663 might be relevant (as it gets into internals how language server processes are spawned)? I believe the issues it that node runtime in VSCode spawns processes naively using the same subsystem, which might be causing problems. It seems someone posted a workaround, could you try and see if it works? |
Sorry, I just gave up on this for a while. If you are referring to the I just discovered that it's possible to view the Chrome dev console in VSCode, which was a huge help. I see in the warnings:
Then I see:
And no further errors or output (and no IDE assistance when I edit an Any thoughts? |
Just an idea to establish connection between RLS and VS Code. I cannot test this as I don't use Windows. Can you run
in WSL. Under Windows you would then create a cmd file containing the equivalent of Although, I am not sure if using RLS this way would work, even if the communication works. The reason is that RLS needs access to the files in the cargo project using the paths provided by the LSP client. Since the LSP client (VS Code) would use Windows paths but RLS would expect Linux paths this might be a problem. The LSP (language server protocol) does not offer using a "remote" server in all cases, e.g., the LSP does not provide a way for the server to access files through the client. It would require a custom LSP extension to make this work. This also means that sandboxing LSP servers or running them on a remote machine is not simple. |
I'm not sure exactly what that command is trying to do. Also, as far as I can tell, RLS does not run as an HTTP service, but rather as some kind of stdio loop service (not sure what to call this). In any case, the output of that command in WSL is basically the same as it is on my CentOS box:
|
@kardeiz I forgot the The command should open netcat listening on port 1234 on localhost and execute rls ( |
Oh, sorry, no, I wasn't familiar with using netcat as a server like that. Cool! Yes, that works. |
Hi, I'm quite new to the WSL. I'm not sure what "containing the equivalent of nc localhost 1234" should look like 🤔 Can someone explain this to me? Or is there an even better way to solve this available now? Thank you. |
Any update on whether we can use WSL? |
Will do that, thanks for doing the triage! |
Is it possible to use this extension on Windows, where VSCode is a Windows app, but where
rustup
/rustc
/cargo
/rls
are provided through the Windows Subsystem for Linux (WSL)bash
?I've tried some naive things, like changing the integrated terminal and
windowsExec
to usebash
, which works just fine, but the plugin keeps complaining "Couldn't start client Rust Language Server".I also tried hardcoding
rls.path
to the path of RLS (installed via rustup on WSL bash).Thanks!
The text was updated successfully, but these errors were encountered: