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 ability to configure code actions that trigger sign/virtual text #311

Merged
merged 3 commits into from
Aug 27, 2024

Conversation

trevorwhitney
Copy link
Contributor

@trevorwhitney trevorwhitney commented Aug 23, 2024

This PR adds a configuration option to the lsp.code_action section of the config to specify which code actions to exclude for triggering the sign and virtual text for.

The problem this solves is that, at least with gopls, there is a source.documentation code action that shows up for pretty much every line. This makes the sign and virtual text useless and noisy. The codeActions LSP call accepts an only parameter, setting this to a subset of the actions allows me to filter out the source.documenation action. The default is an empty table which will preserve the existing behavior.

I'm not sure if we want this exposed per language server, not sure how to plumb that in if so?

Here's some additional context on the problem this is solving: golang/go#68783

@trevorwhitney trevorwhitney changed the title add ability to configure allowed code actions add ability to configure code actions that trigger sign/virtual text Aug 23, 2024
@trevorwhitney
Copy link
Contributor Author

I might need some help with these tests, not sure I understand the failure

Copy link
Owner

@ray-x ray-x left a comment

Choose a reason for hiding this comment

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

Thanks, the github actions should be green once you merge the latest master

@ray-x ray-x merged commit 53efe4b into ray-x:master Aug 27, 2024
2 of 3 checks passed
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.

2 participants