This PR adds support for WSL (Windows Subsystem for Linux). In order to reach WSL's Ruby, we need to add wsl before the Linux path, as described here.
$ wsl /usr/bin/ruby
# or using rvm
$ wsl /home/<my_user>/.rvm/gems/ruby-2.6.6/wrappers/ruby
# for reaching solargraph binary
$ wsl /home/<my_user>/.rvm/gems/ruby-2.6.6/wrappers/solargraph
This PR implements useWSL flag in the configuration so it will append wsl to the commandPath, so you can use it as such:
import * as solargraph from 'solargraph-utils';
let configuration = new solargraph.Configuration(useWSL: true, commandPath: '/home/<my_user>/.rvm/gems/ruby-2.6.6/wrappers/solargraph');
let provider = new solargraph.SocketProvider(configuration);
provider.start().then(() => {
console.log('Socket server is listening on port ' + provider.port);
});
This PR adds support for WSL (Windows Subsystem for Linux). In order to reach WSL's Ruby, we need to add
wsl
before the Linux path, as described here.This PR implements
useWSL
flag in the configuration so it will appendwsl
to thecommandPath
, so you can use it as such: