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

Support DocumentLink request #195

Merged
merged 5 commits into from
Jul 27, 2022
Merged

Support DocumentLink request #195

merged 5 commits into from
Jul 27, 2022

Conversation

st0012
Copy link
Member

@st0012 st0012 commented Jul 14, 2022

Motivation

This request uses the gem source comments generated by Tapioca to let users quickly jump to the actual source of the definition.

Implementation

Add a new DocumentLink request to detect # source://PATH_TO_FILE:line comments and return clickable links if the file exists.

Automated Tests

New expectation + integration test cases.

Manual Tests

  1. Install the vscode-ruby-lsp extension from the PR
  2. Check out to the branch and restart LSP
  3. Run bundle exec tapioca gem to make sure we have rbi files that have the new source comments
  4. Find a file that has # source://PATH_TO_FILE:line comments and hover the mouse over one of them
    • It should show Jump to PATH_TO_FILE#line in the tooltip
    • If you click it, it should take it to the exact location

Demo

document_link

@st0012 st0012 added the enhancement New feature or request label Jul 14, 2022
@st0012 st0012 self-assigned this Jul 14, 2022
@st0012 st0012 force-pushed the support-document-link branch 2 times, most recently from 777097a to 4d8f6ba Compare July 26, 2022 10:03
@vinistock
Copy link
Member

This PR looks almost ready to go for us all to enjoy jumping to gem source from RBIs. Can we please finalize the request documentation?

st0012 and others added 3 commits July 26, 2022 18:19
This request uses the gem source comments generated by Tapioca to
let users quickly jump to the actual source of the definition.
Co-authored-by: Alexandre Terrasa <[email protected]>
Co-authored-by: Vinicius Stock <[email protected]>
Co-authored-by: Stan Lo <[email protected]>
Co-authored-by: Maple Ong <[email protected]>
Co-authored-by: Adison Lampert <[email protected]>
Co-authored-by: Emily Giurleo <[email protected]>
@st0012 st0012 force-pushed the support-document-link branch from 4d8f6ba to 91fd038 Compare July 26, 2022 18:04
@st0012 st0012 force-pushed the support-document-link branch from aeaab14 to 9ec0495 Compare July 26, 2022 19:58
@st0012 st0012 marked this pull request as ready for review July 26, 2022 20:07
@st0012 st0012 requested a review from a team as a code owner July 26, 2022 20:07
@st0012 st0012 requested review from Morriar and vinistock July 26, 2022 20:23
Copy link
Member

@vinistock vinistock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

lib/ruby_lsp/requests/document_link.rb Outdated Show resolved Hide resolved
@st0012 st0012 merged commit 979a1fd into main Jul 27, 2022
@st0012 st0012 deleted the support-document-link branch July 27, 2022 15:30
vinistock pushed a commit that referenced this pull request Aug 12, 2022
@shopify-shipit shopify-shipit bot temporarily deployed to production August 26, 2022 20:47 Inactive
andyw8 pushed a commit to andyw8/ruby-lsp that referenced this pull request Mar 2, 2024
…sbuild-0.15.5

Bump esbuild from 0.15.3 to 0.15.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants