Skip to content

Conversation

@tx3stn
Copy link
Contributor

@tx3stn tx3stn commented Oct 29, 2025

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:

  • Before:
Screenshot 2025-10-29 at 10 05 40
  • After:
Screenshot 2025-10-29 at 10 43 25 (note the duplicate rule id comes from how the lsp client is displaying the message, in some mechanisms you don't see the rule id in square brackets so having it included in the message ensures it's always visible, but can be removed if there is an issue with the doubling up in some cases)

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.

@tx3stn tx3stn changed the title add more output to lsp message add more output to lsp message & open docs code action Oct 29, 2025
Copy link
Owner

@daveshanley daveshanley left a comment

Choose a reason for hiding this comment

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

LGTM!

@daveshanley daveshanley added the release/patch Patch / non-breaking release label Oct 29, 2025
@daveshanley daveshanley merged commit 4faa08b into daveshanley:main Oct 29, 2025
3 of 4 checks passed
@tx3stn tx3stn deleted the add-more-info-to-lsp branch October 29, 2025 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release/patch Patch / non-breaking release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants