add more output to lsp message & open docs code action #742
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.
When using the language server it would be nice to have a bit more of the rule detail in the diagnostic message, most importantly the how to fix.
This change adds more detail if those fields exist on the rule.
Example in using vacuum in neovim:
Also adds a code action to open the documentation url for a rule, so people can easily view the docs for anything flagged. This uses the same open browser approach as added to the tui for custom documentation urls, so I moved that into a util so it can be used in both places.
Now when you hover over a diagnostic you can open the docs directly.