Allow diagnostic tagging to use either push or pull diagnostics#62738
Merged
CyrusNajmabadi merged 1 commit intodotnet:mainfrom Jul 18, 2022
Merged
Allow diagnostic tagging to use either push or pull diagnostics#62738CyrusNajmabadi merged 1 commit intodotnet:mainfrom
CyrusNajmabadi merged 1 commit intodotnet:mainfrom
Conversation
CyrusNajmabadi
commented
Jul 18, 2022
| { | ||
| // We support inline diagnostics in both push and pull (since lsp doesn't support inline diagnostics yet). | ||
| return true; | ||
| } |
Contributor
Author
There was a problem hiding this comment.
@dibarbet i assume we need this. Indeed, i haven't tested it yet, but i'm guessing that if you enable pull diagnostics you lost inline-diagnostics? I can't see how it could worth otherwise.
Member
There was a problem hiding this comment.
yeah, just verified they currently don't appear with it on. thanks for the catch!
CyrusNajmabadi
commented
Jul 18, 2022
| protected internal override bool SupportsDignosticMode(DiagnosticMode mode) | ||
| { | ||
| // We only support push diagnostics. When pull diagnostics are on, diagnostic fading is handled by the lsp client. | ||
| return mode == DiagnosticMode.Push; |
Member
There was a problem hiding this comment.
CyrusNajmabadi
commented
Jul 18, 2022
| { | ||
| // We only support push diagnostics. When pull diagnostics are on, ellipses suggestions are handled by the | ||
| // lsp client. | ||
| return mode == DiagnosticMode.Push; |
Contributor
Author
There was a problem hiding this comment.
@dibarbet does lsp support the ... tags for lightbulbs?
dibarbet
approved these changes
Jul 18, 2022
| { | ||
| // We support inline diagnostics in both push and pull (since lsp doesn't support inline diagnostics yet). | ||
| return true; | ||
| } |
Member
There was a problem hiding this comment.
yeah, just verified they currently don't appear with it on. thanks for the catch!
| protected internal override bool SupportsDignosticMode(DiagnosticMode mode) | ||
| { | ||
| // We only support push diagnostics. When pull diagnostics are on, diagnostic fading is handled by the lsp client. | ||
| return mode == DiagnosticMode.Push; |
Member
There was a problem hiding this comment.
| { | ||
| // We only support push diagnostics. When pull diagnostics are on, ellipses suggestions are handled by the | ||
| // lsp client. | ||
| return mode == DiagnosticMode.Push; |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Currently diagnostic tagging only uses push diagnostics. However, we would like to switch to pull diagnostics fully. This allows tagging to utilize pull diagnostics if that is on.
Note: when pull diagnostics is on the LSP client takes over several tagging roles (like squiggles). So if that's on, we disable our own taggers there since they're nto needed.