This repository was archived by the owner on Aug 31, 2023. It is now read-only.
Include link to rule documentation in LSP diagnostics #4093
rchl
started this conversation in
Suggestions
Replies: 2 comments 1 reply
-
|
Note that eslint also provides an extra code action for opening the rule documentation link but this does not necessarily belong in the same issue. Also, it's a bit special because it needs custom editor command to trigger opening of the link in the browser. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
@rchl for feature requests, we use GitHub discussions :) |
Beta Was this translation helpful? Give feedback.
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" }Beta Was this translation helpful? Give feedback.
All reactions