Commit 2a3f054
committed
Add middleware to intercept diagnostics from the server
Clients may want to inspect diagnostics received from the server
before letting VS Code handle and display them. It is not possible to
use onNotification because the existing handler will be replaced.
Thus, we need to introduce a new middleware for the language client
to route the server's textDocument/publishDiagnostics notification
to. This will allow the client can do what it needs to do before then
forwarding it off to VS Code.
Signed-off-by: Remy Suen <[email protected]>1 parent 6501c8f commit 2a3f054
File tree
3 files changed
+30
-3
lines changed- client/src
- test
- servers
3 files changed
+30
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
415 | 415 | | |
416 | 416 | | |
417 | 417 | | |
| 418 | + | |
418 | 419 | | |
419 | 420 | | |
420 | 421 | | |
| |||
2740 | 2741 | | |
2741 | 2742 | | |
2742 | 2743 | | |
| 2744 | + | |
| 2745 | + | |
| 2746 | + | |
| 2747 | + | |
| 2748 | + | |
| 2749 | + | |
| 2750 | + | |
| 2751 | + | |
| 2752 | + | |
| 2753 | + | |
| 2754 | + | |
| 2755 | + | |
2743 | 2756 | | |
2744 | 2757 | | |
2745 | 2758 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
21 | 34 | | |
22 | 35 | | |
23 | 36 | | |
| |||
36 | 49 | | |
37 | 50 | | |
38 | 51 | | |
39 | | - | |
40 | | - | |
41 | 52 | | |
42 | 53 | | |
43 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
0 commit comments