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

lsp: Implement code actions for new fixes #661

Merged
merged 2 commits into from
Apr 18, 2024

Conversation

charlieegan3
Copy link
Member

#653 added fixes for no-whitespace-comment and use-assignment-operator. This PR adds code actions for these in the regal lsp.

Fixes #659

Fixes #649

@charlieegan3 charlieegan3 marked this pull request as ready for review April 18, 2024 13:42
@charlieegan3 charlieegan3 force-pushed the lsp-fixes-for-comment-assignment branch from b84da98 to 8adb96d Compare April 18, 2024 13:42
Copy link
Member

@anderseknert anderseknert left a comment

Choose a reason for hiding this comment

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

Looks great! Just some questions.

"extract target and location": {
ExecuteCommandParams: types.ExecuteCommandParams{
Command: "example",
Arguments: []interface{}{"target", "1", 2}, // different types for testing, but should be strings
Copy link
Member

Choose a reason for hiding this comment

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

I suppose we could have standardized on args just being a single object for all commands, which we could serialize into a struct. But this might be more aligned with what the LSP "expects".

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah I wasn't so sure about this but figured that we'd go with this until we ran into some issues. It's all internal so seemed ok to go with this for now.

internal/lsp/server.go Outdated Show resolved Hide resolved
#653 added fixes for
no-whitespace-comment and use-assignment-operator. This PR adds code
actions for these in the regal lsp.

Signed-off-by: Charlie Egan <[email protected]>
@charlieegan3 charlieegan3 force-pushed the lsp-fixes-for-comment-assignment branch from 8adb96d to 3684090 Compare April 18, 2024 16:18
@charlieegan3 charlieegan3 force-pushed the lsp-fixes-for-comment-assignment branch from c9dd044 to 3a1d447 Compare April 18, 2024 16:23
@charlieegan3 charlieegan3 merged commit 8ae24da into main Apr 18, 2024
3 checks passed
@charlieegan3 charlieegan3 deleted the lsp-fixes-for-comment-assignment branch April 18, 2024 16:26
srenatus pushed a commit to srenatus/regal that referenced this pull request Oct 1, 2024
* lsp: Implement code actions for new fixes

StyraInc#653 added fixes for
no-whitespace-comment and use-assignment-operator. This PR adds code
actions for these in the regal lsp.

Signed-off-by: Charlie Egan <[email protected]>

* Move commands under a fix namespace

Signed-off-by: Charlie Egan <[email protected]>

---------

Signed-off-by: Charlie Egan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create code action for no-whitespace-comment Create code action for use-assignment-operator
2 participants