This would allow us to disable diagnostics when didChange is called but
diagnostics are not wanted (e.g. code completion).
Details
- Reviewers
sammccall - Commits
- rG51fed1834258: [clangd] Extend textDocument/didChange to specify whether diagnostics should be…
rL325813: [clangd] Extend textDocument/didChange to specify whether diagnostics should be…
rCTE325813: [clangd] Extend textDocument/didChange to specify whether diagnostics should be…
Diff Detail
- Repository
- rCTE Clang Tools Extra
Event Timeline
Nice, this will be useful for at least a couple of editor integrations.
clangd/Protocol.h | ||
---|---|---|
301 | Nit: a little weird to lead with the missing case. Suggest rephrase as: Forces diagnostics to be generated, or to not be generated. for this version of the file. | |
test/clangd/want-diagnostics.test | ||
5 ↗ | (On Diff #135457) | I think this test doesn't test anything useful because the check lines are not sequenced with respect to the input. I'm not sure a lit test is that useful here, the actual logic is already unit tested. If we really want to test the ClangdLSPServer change, a unit test might be easier to get right, but personally I'd be happy enough leaving the logic untested (and maybe throwing a wantDiagnostics into one of the updates in protocol.test) |
Nit: a little weird to lead with the missing case. Suggest rephrase as:
Forces diagnostics to be generated, or to not be generated. for this version of the file.
If not set, diagnostics are eventually consistent: either they will be provided for this version
or some subsequent one.