vscode-languageserver-protocol 3.17.5 → 3.17.6-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23,45 +23,66 @@ import { DiagnosticClientCapabilities, DiagnosticOptions, DiagnosticRegistration
23
23
  import { NotebookDocumentSyncClientCapabilities, NotebookCellKind, ExecutionSummary, NotebookCell, NotebookDocument, NotebookDocumentIdentifier, VersionedNotebookDocumentIdentifier, NotebookDocumentSyncOptions, NotebookDocumentSyncRegistrationOptions, NotebookDocumentSyncRegistrationType, DidOpenNotebookDocumentParams, DidOpenNotebookDocumentNotification, NotebookCellArrayChange, NotebookDocumentChangeEvent, DidChangeNotebookDocumentParams, DidChangeNotebookDocumentNotification, DidSaveNotebookDocumentParams, DidSaveNotebookDocumentNotification, DidCloseNotebookDocumentParams, DidCloseNotebookDocumentNotification } from './protocol.notebook';
24
24
  import { InlineCompletionClientCapabilities, InlineCompletionOptions, InlineCompletionParams, InlineCompletionRegistrationOptions, InlineCompletionRequest } from './protocol.inlineCompletion';
25
25
  /**
26
- * A document filter denotes a document by different properties like
27
- * the {@link TextDocument.languageId language}, the {@link Uri.scheme scheme} of
28
- * its resource, or a glob-pattern that is applied to the {@link TextDocument.fileName path}.
29
- *
30
- * Glob patterns can have the following syntax:
31
- * - `*` to match one or more characters in a path segment
32
- * - `?` to match on one character in a path segment
33
- * - `**` to match any number of path segments, including none
34
- * - `{}` to group sub patterns into an OR expression. (e.g. `**​/*.{ts,js}` matches all TypeScript and JavaScript files)
35
- * - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …)
36
- * - `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`)
26
+ * A document filter where `language` is required field.
37
27
  *
38
- * @sample A language filter that applies to typescript files on disk: `{ language: 'typescript', scheme: 'file' }`
39
- * @sample A language filter that applies to all package.json paths: `{ language: 'json', pattern: '**package.json' }`
40
- *
41
- * @since 3.17.0
28
+ * @since 3.18.0
29
+ * @proposed
42
30
  */
43
- export type TextDocumentFilter = {
31
+ export interface TextDocumentFilterLanguage {
44
32
  /** A language id, like `typescript`. */
45
33
  language: string;
46
34
  /** A Uri {@link Uri.scheme scheme}, like `file` or `untitled`. */
47
35
  scheme?: string;
48
36
  /** A glob pattern, like **​/*.{ts,js}. See TextDocumentFilter for examples. */
49
37
  pattern?: string;
50
- } | {
38
+ }
39
+ /**
40
+ * A document filter where `scheme` is required field.
41
+ *
42
+ * @since 3.18.0
43
+ * @proposed
44
+ */
45
+ export interface TextDocumentFilterScheme {
51
46
  /** A language id, like `typescript`. */
52
47
  language?: string;
53
48
  /** A Uri {@link Uri.scheme scheme}, like `file` or `untitled`. */
54
49
  scheme: string;
55
50
  /** A glob pattern, like **​/*.{ts,js}. See TextDocumentFilter for examples. */
56
51
  pattern?: string;
57
- } | {
52
+ }
53
+ /**
54
+ * A document filter where `pattern` is required field.
55
+ *
56
+ * @since 3.18.0
57
+ * @proposed
58
+ */
59
+ export interface TextDocumentFilterPattern {
58
60
  /** A language id, like `typescript`. */
59
61
  language?: string;
60
62
  /** A Uri {@link Uri.scheme scheme}, like `file` or `untitled`. */
61
63
  scheme?: string;
62
64
  /** A glob pattern, like **​/*.{ts,js}. See TextDocumentFilter for examples. */
63
65
  pattern: string;
64
- };
66
+ }
67
+ /**
68
+ * A document filter denotes a document by different properties like
69
+ * the {@link TextDocument.languageId language}, the {@link Uri.scheme scheme} of
70
+ * its resource, or a glob-pattern that is applied to the {@link TextDocument.fileName path}.
71
+ *
72
+ * Glob patterns can have the following syntax:
73
+ * - `*` to match one or more characters in a path segment
74
+ * - `?` to match on one character in a path segment
75
+ * - `**` to match any number of path segments, including none
76
+ * - `{}` to group sub patterns into an OR expression. (e.g. `**​/*.{ts,js}` matches all TypeScript and JavaScript files)
77
+ * - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …)
78
+ * - `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`)
79
+ *
80
+ * @sample A language filter that applies to typescript files on disk: `{ language: 'typescript', scheme: 'file' }`
81
+ * @sample A language filter that applies to all package.json paths: `{ language: 'json', pattern: '**package.json' }`
82
+ *
83
+ * @since 3.17.0
84
+ */
85
+ export type TextDocumentFilter = TextDocumentFilterLanguage | TextDocumentFilterScheme | TextDocumentFilterPattern;
65
86
  /**
66
87
  * The TextDocumentFilter namespace provides helper functions to work with
67
88
  * {@link TextDocumentFilter} literals.
@@ -72,34 +93,55 @@ export declare namespace TextDocumentFilter {
72
93
  function is(value: any): value is TextDocumentFilter;
73
94
  }
74
95
  /**
75
- * A notebook document filter denotes a notebook document by
76
- * different properties. The properties will be match
77
- * against the notebook's URI (same as with documents)
96
+ * A notebook document filter where `notebookType` is required field.
78
97
  *
79
- * @since 3.17.0
98
+ * @since 3.18.0
99
+ * @proposed
80
100
  */
81
- export type NotebookDocumentFilter = {
101
+ export interface NotebookDocumentFilterNotebookType {
82
102
  /** The type of the enclosing notebook. */
83
103
  notebookType: string;
84
104
  /** A Uri {@link Uri.scheme scheme}, like `file` or `untitled`. */
85
105
  scheme?: string;
86
106
  /** A glob pattern. */
87
107
  pattern?: string;
88
- } | {
108
+ }
109
+ /**
110
+ * A notebook document filter where `scheme` is required field.
111
+ *
112
+ * @since 3.18.0
113
+ * @proposed
114
+ */
115
+ export interface NotebookDocumentFilterScheme {
89
116
  /** The type of the enclosing notebook. */
90
117
  notebookType?: string;
91
- /** A Uri {@link Uri.scheme scheme}, like `file` or `untitled`.*/
118
+ /** A Uri {@link Uri.scheme scheme}, like `file` or `untitled`. */
92
119
  scheme: string;
93
120
  /** A glob pattern. */
94
121
  pattern?: string;
95
- } | {
122
+ }
123
+ /**
124
+ * A notebook document filter where `pattern` is required field.
125
+ *
126
+ * @since 3.18.0
127
+ * @proposed
128
+ */
129
+ export interface NotebookDocumentFilterPattern {
96
130
  /** The type of the enclosing notebook. */
97
131
  notebookType?: string;
98
132
  /** A Uri {@link Uri.scheme scheme}, like `file` or `untitled`. */
99
133
  scheme?: string;
100
134
  /** A glob pattern. */
101
135
  pattern: string;
102
- };
136
+ }
137
+ /**
138
+ * A notebook document filter denotes a notebook document by
139
+ * different properties. The properties will be match
140
+ * against the notebook's URI (same as with documents)
141
+ *
142
+ * @since 3.17.0
143
+ */
144
+ export type NotebookDocumentFilter = NotebookDocumentFilterNotebookType | NotebookDocumentFilterScheme | NotebookDocumentFilterPattern;
103
145
  /**
104
146
  * The NotebookDocumentFilter namespace provides helper functions to work with
105
147
  * {@link NotebookDocumentFilter} literals.
@@ -637,6 +679,22 @@ export declare namespace PositionEncodingKind {
637
679
  * @since 3.17.0
638
680
  */
639
681
  export type PositionEncodingKind = string;
682
+ /**
683
+ * @since 3.18.0
684
+ * @proposed
685
+ */
686
+ export interface StaleRequestSupportOptions {
687
+ /**
688
+ * The client will actively cancel the request.
689
+ */
690
+ cancel: boolean;
691
+ /**
692
+ * The list of requests for which the client
693
+ * will retry the request if it receives a
694
+ * response with error code `ContentModified`
695
+ */
696
+ retryOnContentModified: string[];
697
+ }
640
698
  /**
641
699
  * General client capabilities.
642
700
  *
@@ -651,18 +709,7 @@ export interface GeneralClientCapabilities {
651
709
  *
652
710
  * @since 3.17.0
653
711
  */
654
- staleRequestSupport?: {
655
- /**
656
- * The client will actively cancel the request.
657
- */
658
- cancel: boolean;
659
- /**
660
- * The list of requests for which the client
661
- * will retry the request if it receives a
662
- * response with error code `ContentModified`
663
- */
664
- retryOnContentModified: string[];
665
- };
712
+ staleRequestSupport?: StaleRequestSupportOptions;
666
713
  /**
667
714
  * Client capabilities specific to regular expressions.
668
715
  *
@@ -802,6 +849,26 @@ export declare namespace WorkDoneProgressOptions {
802
849
  workDoneProgress: boolean;
803
850
  };
804
851
  }
852
+ /**
853
+ * Defines workspace specific capabilities of the server.
854
+ *
855
+ * @since 3.18.0
856
+ * @proposed
857
+ */
858
+ export interface WorkspaceOptions {
859
+ /**
860
+ * The server supports workspace folder.
861
+ *
862
+ * @since 3.6.0
863
+ */
864
+ workspaceFolders?: WorkspaceFoldersServerCapabilities;
865
+ /**
866
+ * The server is interested in notifications/requests for operations on files.
867
+ *
868
+ * @since 3.16.0
869
+ */
870
+ fileOperations?: FileOperationOptions;
871
+ }
805
872
  /**
806
873
  * Defines the capabilities provided by a language
807
874
  * server.
@@ -981,25 +1048,46 @@ export interface ServerCapabilities<T = LSPAny> {
981
1048
  /**
982
1049
  * Workspace specific server capabilities.
983
1050
  */
984
- workspace?: {
985
- /**
986
- * The server supports workspace folder.
987
- *
988
- * @since 3.6.0
989
- */
990
- workspaceFolders?: WorkspaceFoldersServerCapabilities;
991
- /**
992
- * The server is interested in notifications/requests for operations on files.
993
- *
994
- * @since 3.16.0
995
- */
996
- fileOperations?: FileOperationOptions;
997
- };
1051
+ workspace?: WorkspaceOptions;
998
1052
  /**
999
1053
  * Experimental server capabilities.
1000
1054
  */
1001
1055
  experimental?: T;
1002
1056
  }
1057
+ /**
1058
+ * Information about the server
1059
+ *
1060
+ * @since 3.15.0
1061
+ * @since 3.18.0 ServerInfo type name added.
1062
+ * @proposed
1063
+ */
1064
+ export interface ServerInfo {
1065
+ /**
1066
+ * The name of the server as defined by the server.
1067
+ */
1068
+ name: string;
1069
+ /**
1070
+ * The server's version as defined by the server.
1071
+ */
1072
+ version?: string;
1073
+ }
1074
+ /**
1075
+ * Information about the client
1076
+ *
1077
+ * @since 3.15.0
1078
+ * @since 3.18.0 ClientInfo type name added.
1079
+ * @proposed
1080
+ */
1081
+ export interface ClientInfo {
1082
+ /**
1083
+ * The name of the client as defined by the client.
1084
+ */
1085
+ name: string;
1086
+ /**
1087
+ * The client's version as defined by the client.
1088
+ */
1089
+ version?: string;
1090
+ }
1003
1091
  /**
1004
1092
  * The initialize request is sent from the client to the server.
1005
1093
  * It is sent once as the request after starting up the server.
@@ -1029,16 +1117,7 @@ export interface _InitializeParams extends WorkDoneProgressParams {
1029
1117
  *
1030
1118
  * @since 3.15.0
1031
1119
  */
1032
- clientInfo?: {
1033
- /**
1034
- * The name of the client as defined by the client.
1035
- */
1036
- name: string;
1037
- /**
1038
- * The client's version as defined by the client.
1039
- */
1040
- version?: string;
1041
- };
1120
+ clientInfo?: ClientInfo;
1042
1121
  /**
1043
1122
  * The locale the client is currently showing the user interface
1044
1123
  * in. This must not necessarily be the locale of the operating
@@ -1092,16 +1171,7 @@ export interface InitializeResult<T = any> {
1092
1171
  *
1093
1172
  * @since 3.15.0
1094
1173
  */
1095
- serverInfo?: {
1096
- /**
1097
- * The name of the server as defined by the server.
1098
- */
1099
- name: string;
1100
- /**
1101
- * The server's version as defined by the server.
1102
- */
1103
- version?: string;
1104
- };
1174
+ serverInfo?: ServerInfo;
1105
1175
  /**
1106
1176
  * Custom initialization results.
1107
1177
  */
@@ -1243,6 +1313,18 @@ export declare namespace ShowMessageNotification {
1243
1313
  const messageDirection: MessageDirection;
1244
1314
  const type: ProtocolNotificationType<ShowMessageParams, void>;
1245
1315
  }
1316
+ /**
1317
+ * @since 3.18.0
1318
+ * @proposed
1319
+ */
1320
+ export interface ClientShowMessageActionItemOptions {
1321
+ /**
1322
+ * Whether the client supports additional attributes which
1323
+ * are preserved and send back to the server in the
1324
+ * request's response.
1325
+ */
1326
+ additionalPropertiesSupport?: boolean;
1327
+ }
1246
1328
  /**
1247
1329
  * Show message request client capabilities
1248
1330
  */
@@ -1250,14 +1332,7 @@ export interface ShowMessageRequestClientCapabilities {
1250
1332
  /**
1251
1333
  * Capabilities specific to the `MessageActionItem` type.
1252
1334
  */
1253
- messageActionItem?: {
1254
- /**
1255
- * Whether the client supports additional attributes which
1256
- * are preserved and send back to the server in the
1257
- * request's response.
1258
- */
1259
- additionalPropertiesSupport?: boolean;
1260
- };
1335
+ messageActionItem?: ClientShowMessageActionItemOptions;
1261
1336
  }
1262
1337
  export interface MessageActionItem {
1263
1338
  /**
@@ -1419,10 +1494,20 @@ export declare namespace DidOpenTextDocumentNotification {
1419
1494
  const type: ProtocolNotificationType<DidOpenTextDocumentParams, TextDocumentRegistrationOptions>;
1420
1495
  }
1421
1496
  /**
1422
- * An event describing a change to a text document. If only a text is provided
1423
- * it is considered to be the full content of the document.
1497
+ * @since 3.18.0
1498
+ * @proposed
1424
1499
  */
1425
- export type TextDocumentContentChangeEvent = {
1500
+ export interface TextDocumentContentChangeWholeDocument {
1501
+ /**
1502
+ * The new text of the whole document.
1503
+ */
1504
+ text: string;
1505
+ }
1506
+ /**
1507
+ * @since 3.18.0
1508
+ * @proposed
1509
+ */
1510
+ export interface TextDocumentContentChangePartial {
1426
1511
  /**
1427
1512
  * The range of the document that changed.
1428
1513
  */
@@ -1437,12 +1522,12 @@ export type TextDocumentContentChangeEvent = {
1437
1522
  * The new text for the provided range.
1438
1523
  */
1439
1524
  text: string;
1440
- } | {
1441
- /**
1442
- * The new text of the whole document.
1443
- */
1444
- text: string;
1445
- };
1525
+ }
1526
+ /**
1527
+ * An event describing a change to a text document. If only a text is provided
1528
+ * it is considered to be the full content of the document.
1529
+ */
1530
+ export type TextDocumentContentChangeEvent = TextDocumentContentChangePartial | TextDocumentContentChangeWholeDocument;
1446
1531
  export declare namespace TextDocumentContentChangeEvent {
1447
1532
  /**
1448
1533
  * Checks whether the information describes a delta event.
@@ -1748,6 +1833,16 @@ export declare namespace WatchKind {
1748
1833
  const Delete: 4;
1749
1834
  }
1750
1835
  export type WatchKind = uinteger;
1836
+ /**
1837
+ * @since 3.18.0
1838
+ * @proposed
1839
+ */
1840
+ export interface ClientDiagnosticsTagOptions {
1841
+ /**
1842
+ * The tags supported by the client.
1843
+ */
1844
+ valueSet: DiagnosticTag[];
1845
+ }
1751
1846
  /**
1752
1847
  * The publish diagnostic client capabilities.
1753
1848
  */
@@ -1762,12 +1857,7 @@ export interface PublishDiagnosticsClientCapabilities {
1762
1857
  *
1763
1858
  * @since 3.15.0
1764
1859
  */
1765
- tagSupport?: {
1766
- /**
1767
- * The tags supported by the client.
1768
- */
1769
- valueSet: DiagnosticTag[];
1770
- };
1860
+ tagSupport?: ClientDiagnosticsTagOptions;
1771
1861
  /**
1772
1862
  * Whether the client interprets the version property of the
1773
1863
  * `textDocument/publishDiagnostics` notification's parameter.
@@ -1818,6 +1908,140 @@ export declare namespace PublishDiagnosticsNotification {
1818
1908
  const messageDirection: MessageDirection;
1819
1909
  const type: ProtocolNotificationType<PublishDiagnosticsParams, void>;
1820
1910
  }
1911
+ /**
1912
+ * The client supports the following `CompletionList` specific
1913
+ * capabilities.
1914
+ *
1915
+ * @since 3.17.0
1916
+ */
1917
+ export interface CompletionListCapabilities {
1918
+ /**
1919
+ * The client supports the following itemDefaults on
1920
+ * a completion list.
1921
+ *
1922
+ * The value lists the supported property names of the
1923
+ * `CompletionList.itemDefaults` object. If omitted
1924
+ * no properties are supported.
1925
+ *
1926
+ * @since 3.17.0
1927
+ */
1928
+ itemDefaults?: string[];
1929
+ }
1930
+ /**
1931
+ * @since 3.18.0
1932
+ * @proposed
1933
+ */
1934
+ export interface CompletionItemTagOptions {
1935
+ /**
1936
+ * The tags supported by the client.
1937
+ */
1938
+ valueSet: CompletionItemTag[];
1939
+ }
1940
+ /**
1941
+ * @since 3.18.0
1942
+ * @proposed
1943
+ */
1944
+ export interface ClientCompletionItemResolveOptions {
1945
+ /**
1946
+ * The properties that a client can resolve lazily.
1947
+ */
1948
+ properties: string[];
1949
+ }
1950
+ /**
1951
+ * @since 3.18.0
1952
+ * @proposed
1953
+ */
1954
+ export interface ClientCompletionItemInsertTextModeOptions {
1955
+ valueSet: InsertTextMode[];
1956
+ }
1957
+ /**
1958
+ * @since 3.18.0
1959
+ * @proposed
1960
+ */
1961
+ export interface ClientCompletionItemOptions {
1962
+ /**
1963
+ * Client supports snippets as insert text.
1964
+ *
1965
+ * A snippet can define tab stops and placeholders with `$1`, `$2`
1966
+ * and `${3:foo}`. `$0` defines the final tab stop, it defaults to
1967
+ * the end of the snippet. Placeholders with equal identifiers are linked,
1968
+ * that is typing in one will update others too.
1969
+ */
1970
+ snippetSupport?: boolean;
1971
+ /**
1972
+ * Client supports commit characters on a completion item.
1973
+ */
1974
+ commitCharactersSupport?: boolean;
1975
+ /**
1976
+ * Client supports the following content formats for the documentation
1977
+ * property. The order describes the preferred format of the client.
1978
+ */
1979
+ documentationFormat?: MarkupKind[];
1980
+ /**
1981
+ * Client supports the deprecated property on a completion item.
1982
+ */
1983
+ deprecatedSupport?: boolean;
1984
+ /**
1985
+ * Client supports the preselect property on a completion item.
1986
+ */
1987
+ preselectSupport?: boolean;
1988
+ /**
1989
+ * Client supports the tag property on a completion item. Clients supporting
1990
+ * tags have to handle unknown tags gracefully. Clients especially need to
1991
+ * preserve unknown tags when sending a completion item back to the server in
1992
+ * a resolve call.
1993
+ *
1994
+ * @since 3.15.0
1995
+ */
1996
+ tagSupport?: CompletionItemTagOptions;
1997
+ /**
1998
+ * Client support insert replace edit to control different behavior if a
1999
+ * completion item is inserted in the text or should replace text.
2000
+ *
2001
+ * @since 3.16.0
2002
+ */
2003
+ insertReplaceSupport?: boolean;
2004
+ /**
2005
+ * Indicates which properties a client can resolve lazily on a completion
2006
+ * item. Before version 3.16.0 only the predefined properties `documentation`
2007
+ * and `details` could be resolved lazily.
2008
+ *
2009
+ * @since 3.16.0
2010
+ */
2011
+ resolveSupport?: ClientCompletionItemResolveOptions;
2012
+ /**
2013
+ * The client supports the `insertTextMode` property on
2014
+ * a completion item to override the whitespace handling mode
2015
+ * as defined by the client (see `insertTextMode`).
2016
+ *
2017
+ * @since 3.16.0
2018
+ */
2019
+ insertTextModeSupport?: ClientCompletionItemInsertTextModeOptions;
2020
+ /**
2021
+ * The client has support for completion item label
2022
+ * details (see also `CompletionItemLabelDetails`).
2023
+ *
2024
+ * @since 3.17.0
2025
+ */
2026
+ labelDetailsSupport?: boolean;
2027
+ }
2028
+ /**
2029
+ * @since 3.18.0
2030
+ * @proposed
2031
+ */
2032
+ export interface ClientCompletionItemOptionsKind {
2033
+ /**
2034
+ * The completion item kind values the client supports. When this
2035
+ * property exists the client also guarantees that it will
2036
+ * handle values outside its set gracefully and falls back
2037
+ * to a default value when unknown.
2038
+ *
2039
+ * If this property is not present the client only supports
2040
+ * the completion items kinds from `Text` to `Reference` as defined in
2041
+ * the initial version of the protocol.
2042
+ */
2043
+ valueSet?: CompletionItemKind[];
2044
+ }
1821
2045
  /**
1822
2046
  * Completion client capabilities
1823
2047
  */
@@ -1830,98 +2054,8 @@ export interface CompletionClientCapabilities {
1830
2054
  * The client supports the following `CompletionItem` specific
1831
2055
  * capabilities.
1832
2056
  */
1833
- completionItem?: {
1834
- /**
1835
- * Client supports snippets as insert text.
1836
- *
1837
- * A snippet can define tab stops and placeholders with `$1`, `$2`
1838
- * and `${3:foo}`. `$0` defines the final tab stop, it defaults to
1839
- * the end of the snippet. Placeholders with equal identifiers are linked,
1840
- * that is typing in one will update others too.
1841
- */
1842
- snippetSupport?: boolean;
1843
- /**
1844
- * Client supports commit characters on a completion item.
1845
- */
1846
- commitCharactersSupport?: boolean;
1847
- /**
1848
- * Client supports the following content formats for the documentation
1849
- * property. The order describes the preferred format of the client.
1850
- */
1851
- documentationFormat?: MarkupKind[];
1852
- /**
1853
- * Client supports the deprecated property on a completion item.
1854
- */
1855
- deprecatedSupport?: boolean;
1856
- /**
1857
- * Client supports the preselect property on a completion item.
1858
- */
1859
- preselectSupport?: boolean;
1860
- /**
1861
- * Client supports the tag property on a completion item. Clients supporting
1862
- * tags have to handle unknown tags gracefully. Clients especially need to
1863
- * preserve unknown tags when sending a completion item back to the server in
1864
- * a resolve call.
1865
- *
1866
- * @since 3.15.0
1867
- */
1868
- tagSupport?: {
1869
- /**
1870
- * The tags supported by the client.
1871
- */
1872
- valueSet: CompletionItemTag[];
1873
- };
1874
- /**
1875
- * Client support insert replace edit to control different behavior if a
1876
- * completion item is inserted in the text or should replace text.
1877
- *
1878
- * @since 3.16.0
1879
- */
1880
- insertReplaceSupport?: boolean;
1881
- /**
1882
- * Indicates which properties a client can resolve lazily on a completion
1883
- * item. Before version 3.16.0 only the predefined properties `documentation`
1884
- * and `details` could be resolved lazily.
1885
- *
1886
- * @since 3.16.0
1887
- */
1888
- resolveSupport?: {
1889
- /**
1890
- * The properties that a client can resolve lazily.
1891
- */
1892
- properties: string[];
1893
- };
1894
- /**
1895
- * The client supports the `insertTextMode` property on
1896
- * a completion item to override the whitespace handling mode
1897
- * as defined by the client (see `insertTextMode`).
1898
- *
1899
- * @since 3.16.0
1900
- */
1901
- insertTextModeSupport?: {
1902
- valueSet: InsertTextMode[];
1903
- };
1904
- /**
1905
- * The client has support for completion item label
1906
- * details (see also `CompletionItemLabelDetails`).
1907
- *
1908
- * @since 3.17.0
1909
- */
1910
- labelDetailsSupport?: boolean;
1911
- };
1912
- completionItemKind?: {
1913
- /**
1914
- * The completion item kind values the client supports. When this
1915
- * property exists the client also guarantees that it will
1916
- * handle values outside its set gracefully and falls back
1917
- * to a default value when unknown.
1918
- *
1919
- * If this property is not present the client only supports
1920
- * the completion items kinds from `Text` to `Reference` as defined in
1921
- * the initial version of the protocol.
1922
- */
1923
- valueSet?: CompletionItemKind[];
1924
- };
2057
+ completionItem?: ClientCompletionItemOptions;
2058
+ completionItemKind?: ClientCompletionItemOptionsKind;
1925
2059
  /**
1926
2060
  * Defines how the client handles whitespace and indentation
1927
2061
  * when accepting a completion item that uses multi line
@@ -1941,19 +2075,7 @@ export interface CompletionClientCapabilities {
1941
2075
  *
1942
2076
  * @since 3.17.0
1943
2077
  */
1944
- completionList?: {
1945
- /**
1946
- * The client supports the following itemDefaults on
1947
- * a completion list.
1948
- *
1949
- * The value lists the supported property names of the
1950
- * `CompletionList.itemDefaults` object. If omitted
1951
- * no properties are supported.
1952
- *
1953
- * @since 3.17.0
1954
- */
1955
- itemDefaults?: string[];
1956
- };
2078
+ completionList?: CompletionListCapabilities;
1957
2079
  }
1958
2080
  /**
1959
2081
  * How a completion was triggered
@@ -1999,6 +2121,20 @@ export interface CompletionParams extends TextDocumentPositionParams, WorkDonePr
1999
2121
  */
2000
2122
  context?: CompletionContext;
2001
2123
  }
2124
+ /**
2125
+ * @since 3.18.0
2126
+ * @proposed
2127
+ */
2128
+ export interface ServerCompletionItemOptions {
2129
+ /**
2130
+ * The server has support for completion item label
2131
+ * details (see also `CompletionItemLabelDetails`) when
2132
+ * receiving a completion item in a resolve call.
2133
+ *
2134
+ * @since 3.17.0
2135
+ */
2136
+ labelDetailsSupport?: boolean;
2137
+ }
2002
2138
  /**
2003
2139
  * Completion options.
2004
2140
  */
@@ -2036,16 +2172,7 @@ export interface CompletionOptions extends WorkDoneProgressOptions {
2036
2172
  *
2037
2173
  * @since 3.17.0
2038
2174
  */
2039
- completionItem?: {
2040
- /**
2041
- * The server has support for completion item label
2042
- * details (see also `CompletionItemLabelDetails`) when
2043
- * receiving a completion item in a resolve call.
2044
- *
2045
- * @since 3.17.0
2046
- */
2047
- labelDetailsSupport?: boolean;
2048
- };
2175
+ completionItem?: ServerCompletionItemOptions;
2049
2176
  }
2050
2177
  /**
2051
2178
  * Registration options for a {@link CompletionRequest}.
@@ -2114,6 +2241,41 @@ export declare namespace HoverRequest {
2114
2241
  const messageDirection: MessageDirection;
2115
2242
  const type: ProtocolRequestType<HoverParams, Hover | null, never, void, HoverRegistrationOptions>;
2116
2243
  }
2244
+ /**
2245
+ * @since 3.18.0
2246
+ * @proposed
2247
+ */
2248
+ export interface ClientSignatureParameterInformationOptions {
2249
+ /**
2250
+ * The client supports processing label offsets instead of a
2251
+ * simple label string.
2252
+ *
2253
+ * @since 3.14.0
2254
+ */
2255
+ labelOffsetSupport?: boolean;
2256
+ }
2257
+ /**
2258
+ * @since 3.18.0
2259
+ * @proposed
2260
+ */
2261
+ export interface ClientSignatureInformationOptions {
2262
+ /**
2263
+ * Client supports the following content formats for the documentation
2264
+ * property. The order describes the preferred format of the client.
2265
+ */
2266
+ documentationFormat?: MarkupKind[];
2267
+ /**
2268
+ * Client capabilities specific to parameter information.
2269
+ */
2270
+ parameterInformation?: ClientSignatureParameterInformationOptions;
2271
+ /**
2272
+ * The client supports the `activeParameter` property on `SignatureInformation`
2273
+ * literal.
2274
+ *
2275
+ * @since 3.16.0
2276
+ */
2277
+ activeParameterSupport?: boolean;
2278
+ }
2117
2279
  /**
2118
2280
  * Client Capabilities for a {@link SignatureHelpRequest}.
2119
2281
  */
@@ -2126,32 +2288,7 @@ export interface SignatureHelpClientCapabilities {
2126
2288
  * The client supports the following `SignatureInformation`
2127
2289
  * specific properties.
2128
2290
  */
2129
- signatureInformation?: {
2130
- /**
2131
- * Client supports the following content formats for the documentation
2132
- * property. The order describes the preferred format of the client.
2133
- */
2134
- documentationFormat?: MarkupKind[];
2135
- /**
2136
- * Client capabilities specific to parameter information.
2137
- */
2138
- parameterInformation?: {
2139
- /**
2140
- * The client supports processing label offsets instead of a
2141
- * simple label string.
2142
- *
2143
- * @since 3.14.0
2144
- */
2145
- labelOffsetSupport?: boolean;
2146
- };
2147
- /**
2148
- * The client supports the `activeParameter` property on `SignatureInformation`
2149
- * literal.
2150
- *
2151
- * @since 3.16.0
2152
- */
2153
- activeParameterSupport?: boolean;
2154
- };
2291
+ signatureInformation?: ClientSignatureInformationOptions;
2155
2292
  /**
2156
2293
  * The client supports to send additional context information for a
2157
2294
  * `textDocument/signatureHelp` request. A client that opts into
@@ -2377,19 +2514,7 @@ export interface DocumentSymbolClientCapabilities {
2377
2514
  * Specific capabilities for the `SymbolKind` in the
2378
2515
  * `textDocument/documentSymbol` request.
2379
2516
  */
2380
- symbolKind?: {
2381
- /**
2382
- * The symbol kind values the client supports. When this
2383
- * property exists the client also guarantees that it will
2384
- * handle values outside its set gracefully and falls back
2385
- * to a default value when unknown.
2386
- *
2387
- * If this property is not present the client only supports
2388
- * the symbol kinds from `File` to `Array` as defined in
2389
- * the initial version of the protocol.
2390
- */
2391
- valueSet?: SymbolKind[];
2392
- };
2517
+ symbolKind?: ClientSymbolKindOptions;
2393
2518
  /**
2394
2519
  * The client supports hierarchical document symbols.
2395
2520
  */
@@ -2401,12 +2526,7 @@ export interface DocumentSymbolClientCapabilities {
2401
2526
  *
2402
2527
  * @since 3.16.0
2403
2528
  */
2404
- tagSupport?: {
2405
- /**
2406
- * The tags supported by the client.
2407
- */
2408
- valueSet: SymbolTag[];
2409
- };
2529
+ tagSupport?: ClientSymbolTagOptions;
2410
2530
  /**
2411
2531
  * The client supports an additional label presented in the UI when
2412
2532
  * registering a document symbol provider.
@@ -2452,6 +2572,40 @@ export declare namespace DocumentSymbolRequest {
2452
2572
  const messageDirection: MessageDirection;
2453
2573
  const type: ProtocolRequestType<DocumentSymbolParams, DocumentSymbol[] | SymbolInformation[] | null, DocumentSymbol[] | SymbolInformation[], void, DocumentSymbolRegistrationOptions>;
2454
2574
  }
2575
+ /**
2576
+ * @since 3.18.0
2577
+ * @proposed
2578
+ */
2579
+ export interface ClientCodeActionKindOptions {
2580
+ /**
2581
+ * The code action kind values the client supports. When this
2582
+ * property exists the client also guarantees that it will
2583
+ * handle values outside its set gracefully and falls back
2584
+ * to a default value when unknown.
2585
+ */
2586
+ valueSet: CodeActionKind[];
2587
+ }
2588
+ /**
2589
+ * @since 3.18.0
2590
+ * @proposed
2591
+ */
2592
+ export interface ClientCodeActionLiteralOptions {
2593
+ /**
2594
+ * The code action kind is support with the following value
2595
+ * set.
2596
+ */
2597
+ codeActionKind: ClientCodeActionKindOptions;
2598
+ }
2599
+ /**
2600
+ * @since 3.18.0
2601
+ * @proposed
2602
+ */
2603
+ export interface ClientCodeActionResolveOptions {
2604
+ /**
2605
+ * The properties that a client can resolve lazily.
2606
+ */
2607
+ properties: string[];
2608
+ }
2455
2609
  /**
2456
2610
  * The Client Capabilities of a {@link CodeActionRequest}.
2457
2611
  */
@@ -2467,21 +2621,7 @@ export interface CodeActionClientCapabilities {
2467
2621
  *
2468
2622
  * @since 3.8.0
2469
2623
  */
2470
- codeActionLiteralSupport?: {
2471
- /**
2472
- * The code action kind is support with the following value
2473
- * set.
2474
- */
2475
- codeActionKind: {
2476
- /**
2477
- * The code action kind values the client supports. When this
2478
- * property exists the client also guarantees that it will
2479
- * handle values outside its set gracefully and falls back
2480
- * to a default value when unknown.
2481
- */
2482
- valueSet: CodeActionKind[];
2483
- };
2484
- };
2624
+ codeActionLiteralSupport?: ClientCodeActionLiteralOptions;
2485
2625
  /**
2486
2626
  * Whether code action supports the `isPreferred` property.
2487
2627
  *
@@ -2508,12 +2648,7 @@ export interface CodeActionClientCapabilities {
2508
2648
  *
2509
2649
  * @since 3.16.0
2510
2650
  */
2511
- resolveSupport?: {
2512
- /**
2513
- * The properties that a client can resolve lazily.
2514
- */
2515
- properties: string[];
2516
- };
2651
+ resolveSupport?: ClientCodeActionResolveOptions;
2517
2652
  /**
2518
2653
  * Whether the client honors the change annotations in
2519
2654
  * text edits and resource operations returned via the
@@ -2584,6 +2719,44 @@ export declare namespace CodeActionResolveRequest {
2584
2719
  const messageDirection: MessageDirection;
2585
2720
  const type: ProtocolRequestType<CodeAction, CodeAction, never, void, void>;
2586
2721
  }
2722
+ /**
2723
+ * @since 3.18.0
2724
+ * @proposed
2725
+ */
2726
+ export interface ClientSymbolKindOptions {
2727
+ /**
2728
+ * The symbol kind values the client supports. When this
2729
+ * property exists the client also guarantees that it will
2730
+ * handle values outside its set gracefully and falls back
2731
+ * to a default value when unknown.
2732
+ *
2733
+ * If this property is not present the client only supports
2734
+ * the symbol kinds from `File` to `Array` as defined in
2735
+ * the initial version of the protocol.
2736
+ */
2737
+ valueSet?: SymbolKind[];
2738
+ }
2739
+ /**
2740
+ * @since 3.18.0
2741
+ * @proposed
2742
+ */
2743
+ export interface ClientSymbolTagOptions {
2744
+ /**
2745
+ * The tags supported by the client.
2746
+ */
2747
+ valueSet: SymbolTag[];
2748
+ }
2749
+ /**
2750
+ * @since 3.18.0
2751
+ * @proposed
2752
+ */
2753
+ export interface ClientSymbolResolveOptions {
2754
+ /**
2755
+ * The properties that a client can resolve lazily. Usually
2756
+ * `location.range`
2757
+ */
2758
+ properties: string[];
2759
+ }
2587
2760
  /**
2588
2761
  * Client capabilities for a {@link WorkspaceSymbolRequest}.
2589
2762
  */
@@ -2595,31 +2768,14 @@ export interface WorkspaceSymbolClientCapabilities {
2595
2768
  /**
2596
2769
  * Specific capabilities for the `SymbolKind` in the `workspace/symbol` request.
2597
2770
  */
2598
- symbolKind?: {
2599
- /**
2600
- * The symbol kind values the client supports. When this
2601
- * property exists the client also guarantees that it will
2602
- * handle values outside its set gracefully and falls back
2603
- * to a default value when unknown.
2604
- *
2605
- * If this property is not present the client only supports
2606
- * the symbol kinds from `File` to `Array` as defined in
2607
- * the initial version of the protocol.
2608
- */
2609
- valueSet?: SymbolKind[];
2610
- };
2771
+ symbolKind?: ClientSymbolKindOptions;
2611
2772
  /**
2612
2773
  * The client supports tags on `SymbolInformation`.
2613
2774
  * Clients supporting tags have to handle unknown tags gracefully.
2614
2775
  *
2615
2776
  * @since 3.16.0
2616
2777
  */
2617
- tagSupport?: {
2618
- /**
2619
- * The tags supported by the client.
2620
- */
2621
- valueSet: SymbolTag[];
2622
- };
2778
+ tagSupport?: ClientSymbolTagOptions;
2623
2779
  /**
2624
2780
  * The client support partial workspace symbols. The client will send the
2625
2781
  * request `workspaceSymbol/resolve` to the server to resolve additional
@@ -2627,13 +2783,7 @@ export interface WorkspaceSymbolClientCapabilities {
2627
2783
  *
2628
2784
  * @since 3.17.0
2629
2785
  */
2630
- resolveSupport?: {
2631
- /**
2632
- * The properties that a client can resolve lazily. Usually
2633
- * `location.range`
2634
- */
2635
- properties: string[];
2636
- };
2786
+ resolveSupport?: ClientSymbolResolveOptions;
2637
2787
  }
2638
2788
  /**
2639
2789
  * The parameters of a {@link WorkspaceSymbolRequest}.
@@ -3093,12 +3243,22 @@ export declare namespace RenameRequest {
3093
3243
  }
3094
3244
  export interface PrepareRenameParams extends TextDocumentPositionParams, WorkDoneProgressParams {
3095
3245
  }
3096
- export type PrepareRenameResult = Range | {
3246
+ /**
3247
+ * @since 3.18.0
3248
+ * @proposed
3249
+ */
3250
+ export interface PrepareRenamePlaceholder {
3097
3251
  range: Range;
3098
3252
  placeholder: string;
3099
- } | {
3253
+ }
3254
+ /**
3255
+ * @since 3.18.0
3256
+ * @proposed
3257
+ */
3258
+ export interface PrepareRenameDefaultBehavior {
3100
3259
  defaultBehavior: boolean;
3101
- };
3260
+ }
3261
+ export type PrepareRenameResult = Range | PrepareRenamePlaceholder | PrepareRenameDefaultBehavior;
3102
3262
  /**
3103
3263
  * A request to test and perform the setup necessary for a rename.
3104
3264
  *
@@ -3154,6 +3314,18 @@ export declare namespace ExecuteCommandRequest {
3154
3314
  const messageDirection: MessageDirection;
3155
3315
  const type: ProtocolRequestType<ExecuteCommandParams, any, never, void, ExecuteCommandRegistrationOptions>;
3156
3316
  }
3317
+ /**
3318
+ * @since 3.18.0
3319
+ * @proposed
3320
+ */
3321
+ export interface ChangeAnnotationsSupportOptions {
3322
+ /**
3323
+ * Whether the client groups edits with equal labels into tree nodes,
3324
+ * for instance all edits labelled with "Changes in Strings" would
3325
+ * be a tree node.
3326
+ */
3327
+ groupsOnLabel?: boolean;
3328
+ }
3157
3329
  export interface WorkspaceEditClientCapabilities {
3158
3330
  /**
3159
3331
  * The client supports versioned document changes in `WorkspaceEdit`s
@@ -3189,14 +3361,7 @@ export interface WorkspaceEditClientCapabilities {
3189
3361
  *
3190
3362
  * @since 3.16.0
3191
3363
  */
3192
- changeAnnotationSupport?: {
3193
- /**
3194
- * Whether the client groups edits with equal labels into tree nodes,
3195
- * for instance all edits labelled with "Changes in Strings" would
3196
- * be a tree node.
3197
- */
3198
- groupsOnLabel?: boolean;
3199
- };
3364
+ changeAnnotationSupport?: ChangeAnnotationsSupportOptions;
3200
3365
  }
3201
3366
  /**
3202
3367
  * The parameters passed via an apply workspace edit request.
@@ -3247,6 +3412,7 @@ export declare namespace ApplyWorkspaceEditRequest {
3247
3412
  const method: 'workspace/applyEdit';
3248
3413
  const messageDirection: MessageDirection;
3249
3414
  const type: ProtocolRequestType<ApplyWorkspaceEditParams, ApplyWorkspaceEditResult, never, void, void>;
3415
+ type HandlerSignature = RequestHandler<ApplyWorkspaceEditParams, ApplyWorkspaceEditResult, void>;
3250
3416
  }
3251
3417
  export { ImplementationRequest, ImplementationParams, ImplementationRegistrationOptions, ImplementationOptions, TypeDefinitionRequest, TypeDefinitionParams, TypeDefinitionRegistrationOptions, TypeDefinitionOptions, WorkspaceFoldersRequest, DidChangeWorkspaceFoldersNotification, DidChangeWorkspaceFoldersParams, WorkspaceFoldersChangeEvent, ConfigurationRequest, ConfigurationParams, ConfigurationItem, DocumentColorRequest, ColorPresentationRequest, DocumentColorOptions, DocumentColorParams, ColorPresentationParams, DocumentColorRegistrationOptions, FoldingRangeClientCapabilities, FoldingRangeOptions, FoldingRangeRequest, FoldingRangeParams, FoldingRangeRegistrationOptions, FoldingRangeRefreshRequest, DeclarationClientCapabilities, DeclarationRequest, DeclarationParams, DeclarationRegistrationOptions, DeclarationOptions, SelectionRangeClientCapabilities, SelectionRangeOptions, SelectionRangeParams, SelectionRangeRequest, SelectionRangeRegistrationOptions, WorkDoneProgressBegin, WorkDoneProgressReport, WorkDoneProgressEnd, WorkDoneProgress, WorkDoneProgressCreateParams, WorkDoneProgressCreateRequest, WorkDoneProgressCancelParams, WorkDoneProgressCancelNotification, CallHierarchyClientCapabilities, CallHierarchyOptions, CallHierarchyRegistrationOptions, CallHierarchyIncomingCallsParams, CallHierarchyIncomingCallsRequest, CallHierarchyOutgoingCallsParams, CallHierarchyOutgoingCallsRequest, CallHierarchyPrepareParams, CallHierarchyPrepareRequest, SemanticTokensPartialResult, SemanticTokensDeltaPartialResult, TokenFormat, SemanticTokensClientCapabilities, SemanticTokensOptions, SemanticTokensRegistrationOptions, SemanticTokensParams, SemanticTokensRequest, SemanticTokensDeltaParams, SemanticTokensDeltaRequest, SemanticTokensRangeParams, SemanticTokensRangeRequest, SemanticTokensRefreshRequest, SemanticTokensRegistrationType, ShowDocumentParams, ShowDocumentRequest, ShowDocumentResult, ShowDocumentClientCapabilities, LinkedEditingRangeClientCapabilities, LinkedEditingRanges, LinkedEditingRangeOptions, LinkedEditingRangeParams, LinkedEditingRangeRegistrationOptions, LinkedEditingRangeRequest, FileOperationOptions, FileOperationClientCapabilities, FileOperationRegistrationOptions, FileOperationPatternOptions, FileOperationPatternKind, DidCreateFilesNotification, CreateFilesParams, FileCreate, WillCreateFilesRequest, DidRenameFilesNotification, RenameFilesParams, FileRename, WillRenameFilesRequest, DidDeleteFilesNotification, DeleteFilesParams, FileDelete, WillDeleteFilesRequest, UniquenessLevel, MonikerKind, Moniker, MonikerClientCapabilities, MonikerOptions, MonikerRegistrationOptions, MonikerParams, MonikerRequest, TypeHierarchyClientCapabilities, TypeHierarchyOptions, TypeHierarchyRegistrationOptions, TypeHierarchyPrepareParams, TypeHierarchyPrepareRequest, TypeHierarchySubtypesParams, TypeHierarchySubtypesRequest, TypeHierarchySupertypesParams, TypeHierarchySupertypesRequest, InlineValueClientCapabilities, InlineValueOptions, InlineValueRegistrationOptions, InlineValueWorkspaceClientCapabilities, InlineValueParams, InlineValueRequest, InlineValueRefreshRequest, InlayHintClientCapabilities, InlayHintOptions, InlayHintRegistrationOptions, InlayHintWorkspaceClientCapabilities, InlayHintParams, InlayHintRequest, InlayHintResolveRequest, InlayHintRefreshRequest, DiagnosticClientCapabilities, DiagnosticOptions, DiagnosticRegistrationOptions, DiagnosticServerCancellationData, DocumentDiagnosticParams, DocumentDiagnosticReportKind, FullDocumentDiagnosticReport, RelatedFullDocumentDiagnosticReport, UnchangedDocumentDiagnosticReport, RelatedUnchangedDocumentDiagnosticReport, DocumentDiagnosticReport, DocumentDiagnosticReportPartialResult, DocumentDiagnosticRequest, PreviousResultId, WorkspaceDiagnosticParams, WorkspaceFullDocumentDiagnosticReport, WorkspaceUnchangedDocumentDiagnosticReport, WorkspaceDocumentDiagnosticReport, WorkspaceDiagnosticReport, WorkspaceDiagnosticReportPartialResult, WorkspaceDiagnosticRequest, DiagnosticRefreshRequest, NotebookDocumentSyncClientCapabilities, NotebookCellKind, ExecutionSummary, NotebookCell, NotebookDocument, NotebookDocumentIdentifier, VersionedNotebookDocumentIdentifier, NotebookDocumentSyncOptions, NotebookDocumentSyncRegistrationOptions, NotebookDocumentSyncRegistrationType, DidOpenNotebookDocumentParams, DidOpenNotebookDocumentNotification, NotebookCellArrayChange, NotebookDocumentChangeEvent, DidChangeNotebookDocumentParams, DidChangeNotebookDocumentNotification, DidSaveNotebookDocumentParams, DidSaveNotebookDocumentNotification, DidCloseNotebookDocumentParams, DidCloseNotebookDocumentNotification, InlineCompletionClientCapabilities, InlineCompletionOptions, InlineCompletionParams, InlineCompletionRegistrationOptions, InlineCompletionRequest };
3252
3418
  export { DocumentColorOptions as ColorProviderOptions, DocumentColorOptions as ColorOptions, FoldingRangeOptions as FoldingRangeProviderOptions, SelectionRangeOptions as SelectionRangeProviderOptions, DocumentColorRegistrationOptions as ColorRegistrationOptions };