Shopify / ruby-lsp

An opinionated language server for Ruby
https://shopify.github.io/ruby-lsp/
MIT License
1.6k stars 161 forks source link

Go-to-Definition -> Go-to-test feature #2665

Open tomajask opened 1 month ago

tomajask commented 1 month ago

I have checked that this feature is not already implemented

Use case

I want to go from the class definition to its test file using go-to functionality.

Description

Is there an option to go from the class itself to the test file for this class? I couldn't find such feature. It would be quite helpful to go from class to test (MiniTest or RSpec).

Note

The link provided for features list is broken (404).

Implementation

No response

vinistock commented 1 month ago

Thank you for the suggestion! VS Code is actually working on standardizing a go to related file feature, which I assume will eventually be available for language servers. Once that is in place, we can start offering the new feature.

andyw8 commented 1 month ago

Note

The link provided for features list is broken (404).

Thanks: https://github.com/Shopify/ruby-lsp/pull/2670

vinistock commented 2 weeks ago

I finally found the related VS Code issue https://github.com/microsoft/vscode/issues/126932. Once that's finalized in VS Code and standardized into the LSP spec, we can provide this feature.