Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

Go to definition not working in 0.15.0 for VS Code - Insiders #209

Closed
mr-rob0to opened this issue Sep 21, 2017 · 15 comments
Closed

Go to definition not working in 0.15.0 for VS Code - Insiders #209

mr-rob0to opened this issue Sep 21, 2017 · 15 comments

Comments

@mr-rob0to
Copy link

Your environment

  • vscode-ruby version: 0.15.0
  • Ruby version: ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin16]
  • VS Code version: 1.17.0-insider (1.17.0-insider)
  • Operating System: 10.12.6 (macOS Sierra)
  • Hardware (optional): MBP

Make sure you have ruby, ruby-debug-ide and ruby-debug-basex19 installed before submitting your issue -- thank you !

Expected behavior

Right-clicking or a class or method and selecting go to definition should direct me to the file where the definition exists.

CMD+ selecting a class, module or method should highlight and take you to the definition.

Actual behavior

After right-clicking and selecting go to definition, the definition is never found. You get a response saying "no definition found for... "

Hovering over a class, module or method and pressing down on CMD does not highlight the string and you are unable to select it trigger the go to definition.

Steps to reproduce the problem

Open any ruby file (*.rb) and find a method, module or class that you know is defined in another file and attempt to either right-click or CMD+click it and observe the actual behavior mentioned above

@rs-longsheng
Copy link

Any feedback on this issue?

@vcardillo
Copy link

I think you mistyped:

$ gem install ruby-debug-basex19
ERROR:  Could not find a valid gem 'ruby-debug-basex19' (>= 0) in any repository
ERROR:  Possible alternatives: ruby-debug-base19, ruby-debug-base19x, ruby-debug-base193, ruby-debug-base, ruby-debug-ide19

@vcardillo
Copy link

This is broken for me as well.

@mr-rob0to
Copy link
Author

Any updates on this? I am on VS code version 1.19.3 and on vscode-ruby version 0.16.0 and go to definition still does not work!

@castwide
Copy link
Contributor

castwide commented Feb 1, 2018

#248 is a step toward resolving this issue. The next version of the Solargraph extension will include support for going to a definition in any file in the workspace.

@jxdx
Copy link

jxdx commented Mar 15, 2018

Doesn't work in 1.21.1 for me
Or the latest insiders build

@iamsuleyman
Copy link

iamsuleyman commented Mar 16, 2018

It doesn't work for me too! You can install https://github.com/MiguelSavignano/vs-code-ruby-symbols but it works only for file :(

@castwide
Copy link
Contributor

Check which option you're using for ruby.intellisense. If it's solargraph, make sure you have the solargraph gem installed. More information here: https://github.com/castwide/vscode-solargraph

If you use rubyLocate, you might need to configure the include and exclude settings. See this extension's README for configuration.

A related solargraph bug due to character encoding issues is being tracked at castwide/vscode-solargraph#32.

@iamsuleyman
Copy link

@castwide I use solargraph, I'll wait fixing of related bug that you provided. Thank you

@kaka-ruto
Copy link

I fixed this by installing the rails vscode extension, which has support for Go to definition

@castwide
Copy link
Contributor

Gem version 0.17.4 is published. It resolves the character encoding bug that caused "go to definition" to stop working in some workspaces.

@vcardillo
Copy link

It still shows 0.17.0 in the Extensions Marketplace.

@castwide
Copy link
Contributor

castwide commented Mar 24, 2018

Sorry, I meant version 0.17.4 of the Solargraph gem. It only applies if you're using solargraph for the ruby.intellisense or ruby.codeCompletion settings.

@iamsuleyman
Copy link

iamsuleyman commented Mar 24, 2018

I updated solargraph to latest version but "go to definition" doesn't work

@wingrunr21
Copy link
Collaborator

Closing for issue cleanup. Apologies if this is still an issue. We are working to improve the core extension experience.

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

No branches or pull requests

9 participants