Skip to content

Commit 81daeee

Browse files
authored
Add typeName to notifications (#1521)
1 parent 03d62c6 commit 81daeee

4 files changed

Lines changed: 88 additions & 21 deletions

File tree

protocol/metaModel.json

Lines changed: 74 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1936,6 +1936,7 @@
19361936
"notifications": [
19371937
{
19381938
"method": "workspace/didChangeWorkspaceFolders",
1939+
"typeName": "DidChangeWorkspaceFoldersNotification",
19391940
"messageDirection": "clientToServer",
19401941
"params": {
19411942
"kind": "reference",
@@ -1945,6 +1946,7 @@
19451946
},
19461947
{
19471948
"method": "window/workDoneProgress/cancel",
1949+
"typeName": "WorkDoneProgressCancelNotification",
19481950
"messageDirection": "clientToServer",
19491951
"params": {
19501952
"kind": "reference",
@@ -1954,6 +1956,7 @@
19541956
},
19551957
{
19561958
"method": "workspace/didCreateFiles",
1959+
"typeName": "DidCreateFilesNotification",
19571960
"messageDirection": "clientToServer",
19581961
"params": {
19591962
"kind": "reference",
@@ -1968,6 +1971,7 @@
19681971
},
19691972
{
19701973
"method": "workspace/didRenameFiles",
1974+
"typeName": "DidRenameFilesNotification",
19711975
"messageDirection": "clientToServer",
19721976
"params": {
19731977
"kind": "reference",
@@ -1982,6 +1986,7 @@
19821986
},
19831987
{
19841988
"method": "workspace/didDeleteFiles",
1989+
"typeName": "DidDeleteFilesNotification",
19851990
"messageDirection": "clientToServer",
19861991
"params": {
19871992
"kind": "reference",
@@ -1996,6 +2001,7 @@
19962001
},
19972002
{
19982003
"method": "notebookDocument/didOpen",
2004+
"typeName": "DidOpenNotebookDocumentNotification",
19992005
"messageDirection": "clientToServer",
20002006
"params": {
20012007
"kind": "reference",
@@ -2011,6 +2017,7 @@
20112017
},
20122018
{
20132019
"method": "notebookDocument/didChange",
2020+
"typeName": "DidChangeNotebookDocumentNotification",
20142021
"messageDirection": "clientToServer",
20152022
"params": {
20162023
"kind": "reference",
@@ -2024,6 +2031,7 @@
20242031
},
20252032
{
20262033
"method": "notebookDocument/didSave",
2034+
"typeName": "DidSaveNotebookDocumentNotification",
20272035
"messageDirection": "clientToServer",
20282036
"params": {
20292037
"kind": "reference",
@@ -2039,6 +2047,7 @@
20392047
},
20402048
{
20412049
"method": "notebookDocument/didClose",
2050+
"typeName": "DidCloseNotebookDocumentNotification",
20422051
"messageDirection": "clientToServer",
20432052
"params": {
20442053
"kind": "reference",
@@ -2054,6 +2063,7 @@
20542063
},
20552064
{
20562065
"method": "initialized",
2066+
"typeName": "InitializedNotification",
20572067
"messageDirection": "clientToServer",
20582068
"params": {
20592069
"kind": "reference",
@@ -2063,11 +2073,13 @@
20632073
},
20642074
{
20652075
"method": "exit",
2076+
"typeName": "ExitNotification",
20662077
"messageDirection": "clientToServer",
20672078
"documentation": "The exit event is sent from the client to the server to\nask the server to exit its process."
20682079
},
20692080
{
20702081
"method": "workspace/didChangeConfiguration",
2082+
"typeName": "DidChangeConfigurationNotification",
20712083
"messageDirection": "clientToServer",
20722084
"params": {
20732085
"kind": "reference",
@@ -2081,6 +2093,7 @@
20812093
},
20822094
{
20832095
"method": "window/showMessage",
2096+
"typeName": "ShowMessageNotification",
20842097
"messageDirection": "serverToClient",
20852098
"params": {
20862099
"kind": "reference",
@@ -2090,6 +2103,7 @@
20902103
},
20912104
{
20922105
"method": "window/logMessage",
2106+
"typeName": "LogMessageNotification",
20932107
"messageDirection": "serverToClient",
20942108
"params": {
20952109
"kind": "reference",
@@ -2099,6 +2113,7 @@
20992113
},
21002114
{
21012115
"method": "telemetry/event",
2116+
"typeName": "TelemetryEventNotification",
21022117
"messageDirection": "serverToClient",
21032118
"params": {
21042119
"kind": "reference",
@@ -2108,6 +2123,7 @@
21082123
},
21092124
{
21102125
"method": "textDocument/didOpen",
2126+
"typeName": "DidOpenTextDocumentNotification",
21112127
"messageDirection": "clientToServer",
21122128
"params": {
21132129
"kind": "reference",
@@ -2121,6 +2137,7 @@
21212137
},
21222138
{
21232139
"method": "textDocument/didChange",
2140+
"typeName": "DidChangeTextDocumentNotification",
21242141
"messageDirection": "clientToServer",
21252142
"params": {
21262143
"kind": "reference",
@@ -2134,6 +2151,7 @@
21342151
},
21352152
{
21362153
"method": "textDocument/didClose",
2154+
"typeName": "DidCloseTextDocumentNotification",
21372155
"messageDirection": "clientToServer",
21382156
"params": {
21392157
"kind": "reference",
@@ -2147,6 +2165,7 @@
21472165
},
21482166
{
21492167
"method": "textDocument/didSave",
2168+
"typeName": "DidSaveTextDocumentNotification",
21502169
"messageDirection": "clientToServer",
21512170
"params": {
21522171
"kind": "reference",
@@ -2160,6 +2179,7 @@
21602179
},
21612180
{
21622181
"method": "textDocument/willSave",
2182+
"typeName": "WillSaveTextDocumentNotification",
21632183
"messageDirection": "clientToServer",
21642184
"params": {
21652185
"kind": "reference",
@@ -2173,6 +2193,7 @@
21732193
},
21742194
{
21752195
"method": "workspace/didChangeWatchedFiles",
2196+
"typeName": "DidChangeWatchedFilesNotification",
21762197
"messageDirection": "clientToServer",
21772198
"params": {
21782199
"kind": "reference",
@@ -2186,6 +2207,7 @@
21862207
},
21872208
{
21882209
"method": "textDocument/publishDiagnostics",
2210+
"typeName": "PublishDiagnosticsNotification",
21892211
"messageDirection": "serverToClient",
21902212
"params": {
21912213
"kind": "reference",
@@ -2195,6 +2217,7 @@
21952217
},
21962218
{
21972219
"method": "$/setTrace",
2220+
"typeName": "SetTraceNotification",
21982221
"messageDirection": "clientToServer",
21992222
"params": {
22002223
"kind": "reference",
@@ -2203,6 +2226,7 @@
22032226
},
22042227
{
22052228
"method": "$/logTrace",
2229+
"typeName": "LogTraceNotification",
22062230
"messageDirection": "serverToClient",
22072231
"params": {
22082232
"kind": "reference",
@@ -2211,6 +2235,7 @@
22112235
},
22122236
{
22132237
"method": "$/cancelRequest",
2238+
"typeName": "CancelNotification",
22142239
"messageDirection": "both",
22152240
"params": {
22162241
"kind": "reference",
@@ -2219,6 +2244,7 @@
22192244
},
22202245
{
22212246
"method": "$/progress",
2247+
"typeName": "ProgressNotification",
22222248
"messageDirection": "both",
22232249
"params": {
22242250
"kind": "reference",
@@ -5711,7 +5737,7 @@
57115737
"kind": "base",
57125738
"name": "string"
57135739
},
5714-
"documentation": "A query string to filter symbols by. Clients may send an empty\nstring here to request all symbols."
5740+
"documentation": "A query string to filter symbols by. Clients may send an empty\nstring here to request all symbols.\n\nThe `query`-parameter should be interpreted in a *relaxed way* as editors\nwill apply their own highlighting and scoring on the results. A good rule\nof thumb is to match case-insensitive and to simply check that the\ncharacters of *query* appear in their order in a candidate symbol.\nServers shouldn't use prefix, substring, or similar strict matching."
57155741
}
57165742
],
57175743
"mixins": [
@@ -8804,7 +8830,7 @@
88048830
"name": "DiagnosticSeverity"
88058831
},
88068832
"optional": true,
8807-
"documentation": "The diagnostic's severity. Can be omitted. If omitted it is up to the\nclient to interpret diagnostics as error, warning, info or hint."
8833+
"documentation": "The diagnostic's severity. To avoid interpretation mismatches when a\nserver is used with different clients it is highly recommended that servers\nalways provide a severity value."
88088834
},
88098835
{
88108836
"name": "code",
@@ -11500,11 +11526,12 @@
1150011526
{
1150111527
"name": "pattern",
1150211528
"type": {
11503-
"kind": "base",
11504-
"name": "string"
11529+
"kind": "reference",
11530+
"name": "GlobPattern"
1150511531
},
1150611532
"optional": true,
11507-
"documentation": "A glob pattern, like **​/*.{ts,js}. See TextDocumentFilter for examples."
11533+
"documentation": "A glob pattern, like **​/*.{ts,js}. See TextDocumentFilter for examples.\n\n@since 3.18.0 - support for relative patterns.",
11534+
"since": "3.18.0 - support for relative patterns."
1150811535
}
1150911536
],
1151011537
"documentation": "A document filter where `language` is required field.\n\n@since 3.18.0",
@@ -11533,11 +11560,12 @@
1153311560
{
1153411561
"name": "pattern",
1153511562
"type": {
11536-
"kind": "base",
11537-
"name": "string"
11563+
"kind": "reference",
11564+
"name": "GlobPattern"
1153811565
},
1153911566
"optional": true,
11540-
"documentation": "A glob pattern, like **​/*.{ts,js}. See TextDocumentFilter for examples."
11567+
"documentation": "A glob pattern, like **​/*.{ts,js}. See TextDocumentFilter for examples.\n\n@since 3.18.0 - support for relative patterns.",
11568+
"since": "3.18.0 - support for relative patterns."
1154111569
}
1154211570
],
1154311571
"documentation": "A document filter where `scheme` is required field.\n\n@since 3.18.0",
@@ -11567,10 +11595,11 @@
1156711595
{
1156811596
"name": "pattern",
1156911597
"type": {
11570-
"kind": "base",
11571-
"name": "string"
11598+
"kind": "reference",
11599+
"name": "GlobPattern"
1157211600
},
11573-
"documentation": "A glob pattern, like **​/*.{ts,js}. See TextDocumentFilter for examples."
11601+
"documentation": "A glob pattern, like **​/*.{ts,js}. See TextDocumentFilter for examples.\n\n@since 3.18.0 - support for relative patterns.",
11602+
"since": "3.18.0 - support for relative patterns."
1157411603
}
1157511604
],
1157611605
"documentation": "A document filter where `pattern` is required field.\n\n@since 3.18.0",
@@ -11599,8 +11628,8 @@
1159911628
{
1160011629
"name": "pattern",
1160111630
"type": {
11602-
"kind": "base",
11603-
"name": "string"
11631+
"kind": "reference",
11632+
"name": "GlobPattern"
1160411633
},
1160511634
"optional": true,
1160611635
"documentation": "A glob pattern."
@@ -11632,8 +11661,8 @@
1163211661
{
1163311662
"name": "pattern",
1163411663
"type": {
11635-
"kind": "base",
11636-
"name": "string"
11664+
"kind": "reference",
11665+
"name": "GlobPattern"
1163711666
},
1163811667
"optional": true,
1163911668
"documentation": "A glob pattern."
@@ -11666,8 +11695,8 @@
1166611695
{
1166711696
"name": "pattern",
1166811697
"type": {
11669-
"kind": "base",
11670-
"name": "string"
11698+
"kind": "reference",
11699+
"name": "GlobPattern"
1167111700
},
1167211701
"documentation": "A glob pattern."
1167311702
}
@@ -12497,6 +12526,16 @@
1249712526
},
1249812527
"optional": true,
1249912528
"documentation": "Whether code lens supports dynamic registration."
12529+
},
12530+
{
12531+
"name": "resolveSupport",
12532+
"type": {
12533+
"kind": "reference",
12534+
"name": "ClientCodeLensResolveOptions"
12535+
},
12536+
"optional": true,
12537+
"documentation": "Whether the client supports resolving additional code lens\nproperties via a separate `codeLens/resolve` request.\n\n@since 3.18.0",
12538+
"since": "3.18.0"
1250012539
}
1250112540
],
1250212541
"documentation": "The client capabilities of a {@link CodeLensRequest}."
@@ -13415,6 +13454,24 @@
1341513454
"documentation": "@since 3.18.0",
1341613455
"since": "3.18.0"
1341713456
},
13457+
{
13458+
"name": "ClientCodeLensResolveOptions",
13459+
"properties": [
13460+
{
13461+
"name": "properties",
13462+
"type": {
13463+
"kind": "array",
13464+
"element": {
13465+
"kind": "base",
13466+
"name": "string"
13467+
}
13468+
},
13469+
"documentation": "The properties that a client can resolve lazily."
13470+
}
13471+
],
13472+
"documentation": "@since 3.18.0",
13473+
"since": "3.18.0"
13474+
},
1341813475
{
1341913476
"name": "ClientFoldingRangeKindOptions",
1342013477
"properties": [

protocol/metaModel.schema.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@
375375
"description": "The direction in which this notification is sent in the protocol."
376376
},
377377
"method": {
378-
"description": "The request's method name.",
378+
"description": "The notifications's method name.",
379379
"type": "string"
380380
},
381381
"params": {
@@ -397,7 +397,7 @@
397397
"type": "boolean"
398398
},
399399
"registrationMethod": {
400-
"description": "Optional a dynamic registration method if it different from the request's method.",
400+
"description": "Optional a dynamic registration method if it different from the notifications's method.",
401401
"type": "string"
402402
},
403403
"registrationOptions": {
@@ -414,6 +414,10 @@
414414
"type": "string"
415415
},
416416
"type": "array"
417+
},
418+
"typeName": {
419+
"description": "The type name of the notifications if any.",
420+
"type": "string"
417421
}
418422
},
419423
"required": [

0 commit comments

Comments
 (0)