Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support WSL #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

gosukiwi
Copy link

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);
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant