-
I'm using ruby-lsp as configured in the rails devcontainers. ruby-lsp is working in my project files where I can "Go to definition" in the source of different gems, but when in the specific gem source file I don't see "Go to definition" there and can't navigate around. It seems ruby-lsp doesn't activate in these files, but I'm unable to find a solution. Does anyone know how to enable "Go to definition", "Symbols" in the gem's source files? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
I suspect this might be a bug. We do register the GEM_PATH as directories for the language server to handle, but maybe the place where gems are being installed is overridden. Do you happen to configure |
Beta Was this translation helpful? Give feedback.
-
Thank you, for taking the time to answer my question. I'm using the default setup that comes with rails devcontainers in Rails 7.2. I checked around but I don't see BUNDLE_PATH set somewhere. I tried with a fresh installation, and the issue is still present. I hope you can be able to recreate the steps, otherwise I will be happy to provide more information if you can guide me how to obtain it. These are the steps that I follow:
Gems are installed in the default ruby location under |
Beta Was this translation helpful? Give feedback.
-
So I just tested outside of the container, directly on my machine, using Ruby 3.3.5 with rbenv and Rails 7.2.1. It does have the same issue, so it would seem it's not a devcontainer configuration. |
Beta Was this translation helpful? Give feedback.
-
I believe I understood the problem. This is a bug for shim based version managers. I'm going to close this discussion so that we can move to the issue #2709. Thank you for reporting this! |
Beta Was this translation helpful? Give feedback.
I believe I understood the problem. This is a bug for shim based version managers. I'm going to close this discussion so that we can move to the issue #2709.
Thank you for reporting this!