forked from rubocop/rubocop
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix handling of textDocument/diagnostic
The `textDocument` parameter for the `textDocument/diagnostic` request is of type `TextDocumentIdentifier`, which has a single property `uri` of type `DocumentUri`. Ref: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_diagnostic According to the spec the `DocumentUri` type does not hold the contents of the document, which the handler currently relies on in order to publish diagnostics to the client. This breaks the LSP mode in Neovim 0.10, which now supports pull diagnostics, and possibly other editors too. The same problem exists in `standardrb` (standardrb/standard#575) I have made the `textDocument/diagnostic` hander a no-op, since diagnostics are already being pushed to clients on `textDocument/didChange`.
- Loading branch information
Showing
3 changed files
with
4 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* [#12664](https://github.com/rubocop/rubocop/pull/12664): Fix handling of `textDocument/diagnostic`. ([@muxcmux][]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters