add ability to configure code actions that trigger sign/virtual text #311
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 asource.documentation
code action that shows up for pretty much every line. This makes the sign and virtual text useless and noisy. ThecodeActions
LSP call accepts anonly
parameter, setting this to a subset of the actions allows me to filter out thesource.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