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

Allow Code Lenses without a command #2069

Merged
merged 1 commit into from
May 17, 2024
Merged

Conversation

andyw8
Copy link
Contributor

@andyw8 andyw8 commented May 17, 2024

Motivation

For Shopify/ruby-lsp-rails#241, I'd like to ship a first iteration which shows the Code Lens but doesn't have any associated command.

Implementation

Allow command_name to be nil.

Automated Tests

n/a

Manual Tests

@andyw8 andyw8 requested a review from a team as a code owner May 17, 2024 14:50
@andyw8 andyw8 requested review from st0012 and vinistock May 17, 2024 14:50
@andyw8 andyw8 added enhancement New feature or request server This pull request should be included in the server gem's release notes labels May 17, 2024
@andyw8 andyw8 changed the title Allow command name to be nil Allow Code Lenses without a command May 17, 2024
@andyw8 andyw8 force-pushed the andyw8/allow-command-name-to-be-nil branch from 69abc40 to b84a26a Compare May 17, 2024 14:55
@andyw8 andyw8 marked this pull request as draft May 17, 2024 15:00
@andyw8 andyw8 marked this pull request as ready for review May 17, 2024 16:04
@andyw8 andyw8 requested a review from egiurleo May 17, 2024 16:04
@andyw8 andyw8 force-pushed the andyw8/allow-command-name-to-be-nil branch from b84a26a to d0de6c8 Compare May 17, 2024 16:10
@andyw8 andyw8 merged commit d506ac4 into main May 17, 2024
33 checks passed
@andyw8 andyw8 deleted the andyw8/allow-command-name-to-be-nil branch May 17, 2024 18:14
@vinistock
Copy link
Member

I don't think we should allow this. When a code lens has no command, the spec mentions it will be an unresolved code lens, meaning that a codeLens/resolve request will be sent when the user clicks on it.

Why do we want to ship a code lens with no command associated to it? Why not ship the complete implementation?

vinistock added a commit that referenced this pull request May 29, 2024
vinistock added a commit that referenced this pull request May 29, 2024
Revert "Allow Code Lenses without a command (#2069)"

This reverts commit d506ac4.
andyw8 pushed a commit that referenced this pull request May 29, 2024
Revert "Allow Code Lenses without a command (#2069)"

This reverts commit d506ac4.
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.

None yet

3 participants