castwide / vscode-solargraph

A Visual Studio Code extension for Solargraph.
Other
425 stars 23 forks source link

No Intellisense for Gems installed in custom home path #263

Open SnackBreak2925 opened 1 year ago

SnackBreak2925 commented 1 year ago

Hello! I use rbenv and have many rails projects and I need go to source code of few gems (for example gem devise). But when i click go to definition i get the answer that the definition for Devise was not found. Before I run rbenv each -v yard gems For bundle install I use bundle install --path ~/.bundle --binstubs Also i have warning

Required path progress_bar could not be resolved

and I have installed gem solargraph-rails

{project_folder}/.bundle/config:

<!-- ---
BUNDLE_PATH: "/home/snack/.bundle"
BUNDLE_BIN: "bin" -->

My settings about it

"[ruby]": {
        "editor.defaultFormatter": "castwide.solargraph"
    },
"solargraph.formatting": true,
"solargraph.diagnostics": true,
"solargraph.bundlerPath": "/home/snack/.rbenv/versions/3.2.0/bin/bundle",
"solargraph.commandPath": "/home/snack/.rbenv/versions/3.2.0/bin/solargraph",
"solargraph.useBundler": false,
"ruby.intellisense": false,

solargraph gem installed on 3.2.0 ruby version and projects on ruby less than 2.4 and solargraph bundle from project folder does not lead to the desired result Do you have any advice on this?

SnackBreak2925 commented 1 year ago

I read a bit the source code of the gem, as well as some questions on the github and came to the conclusion that the BUNDLE_PATH variable is not processed even when added to the configuration file. now I plan to make a pull request on this subject, but first I need to find out how the bundler collects the environment, can someone suggest or send an article regarding this?