castwide / vscode-solargraph

A Visual Studio Code extension for Solargraph.
Other
423 stars 25 forks source link

`solargraph.bundlerPath` & `solargraph.commandPath` Accept Variables? #184

Open nadnoslen opened 4 years ago

nadnoslen commented 4 years ago

I've noticed that trying to specify paths containing variable expressions in my user/workspace settings don't seem to work. I don't know a darn thing about VS Code extension development, so please forgive my ignorance in asking this question...

Why can't I specify variable-decorated or relative path like the following when configuring the solargraph extension?

"solargraph.commandPath": "~/.asdf/installs/ruby/2.7.1/bin/solargraph"
// or
"solargraph.commandPath": "$HOME/.asdf/installs/ruby/2.7.1/bin/solargraph"
// or for bundler in my rails-6+ app
"solargraph.bundlerPath": "./bin/bundle"

Every time I try to use those paths, the extension craters and raises notifications of varying descriptions.

Is this a feature I can help add to the project? Am I missing some sort pitfall?

castwide commented 4 years ago

I'm definitely on board with getting this to work if possible. If you'd like to start looking into it yourself, I suspect the update would have to be in the solargraph-utils package, which this extension uses to spawn Ruby processes.

drewlustro commented 2 years ago

@castwide @nadnoslen – VSCode has notoriously lacked this feature for six years. VSCode supports robust predefined environment variables in tasks.json launch.json, but they do not work in (workspace) settings.json

microsoft/vscode#2809