This repository was archived by the owner on Aug 31, 2023. It is now read-only.
Repository navigation
Include link to rule documentation in LSP diagnostics #4093
rchl
started this conversation in
Suggestions
Replies: 2 comments 1 reply
|
@rchl for feature requests, we use GitHub discussions :) |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
It would be useful to have a link to the documentation of the relevant rule for diagnostics reported when running in LSP mode. For example here we see a diagnostic specifying a rule name but we can't click the rule name to show more information about the rule.
Here is an example of a different diagnostics from eslint with a documentation link:
Per LSP documentation, the
Diagnosticobject can specifycodeDescriptionproperty which includes an URL. This can be used for this purpose and this is what eslint uses. For example:{ "diagnostics": [ { "code": "space-in-parens", "codeDescription": { "href": "https://eslint.org/docs/rules/space-in-parens" }, "message": "There should be no space before this paren.", "range": { "end": { "character": 41, "line": 1019 }, "start": { "character": 40, "line": 1019 } }, "severity": 1, "source": "eslint" } ], "uri": "...ts" }All reactions