Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add go-to-definition support to autoloaded constants #2395

Merged
merged 15 commits into from
Aug 1, 2024

Conversation

st0012
Copy link
Member

@st0012 st0012 commented Jul 31, 2024

Motivation

This PR is based on #1995

Closes #1893

Implementation

Most of the feature is already implemented in #1995 thanks to @Super-Xray.

My changes are:

  • Use the symbol node instead of the autoload call node to trigger the request.
  • Update the test case to account for the latest Sorbet check changes.

Automated Tests

Manual Tests

  1. Pull this branch
  2. Restart the server
  3. Go to lib/ruby_lsp/requests.rb
  4. Click around the autoload statements in the file and see if it lands at the right definition

@st0012 st0012 added enhancement New feature or request server This pull request should be included in the server gem's release notes labels Jul 31, 2024
@st0012 st0012 self-assigned this Jul 31, 2024
@st0012 st0012 requested a review from a team as a code owner July 31, 2024 16:02
@st0012 st0012 requested a review from andyw8 July 31, 2024 16:02
@st0012 st0012 requested a review from andyw8 July 31, 2024 19:23
@st0012 st0012 force-pushed the definition-support-for-autoloaded-constants-2 branch from 779f5e5 to 4f81f6d Compare August 1, 2024 16:45
@st0012 st0012 requested a review from paracycle August 1, 2024 16:46
@st0012 st0012 merged commit 5d9e12c into main Aug 1, 2024
34 checks passed
@st0012 st0012 deleted the definition-support-for-autoloaded-constants-2 branch August 1, 2024 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request server This pull request should be included in the server gem's release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add go to definition support for autoloaded constants
4 participants