You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[analysis_server] Allow legacy clients to set LSP capabilities in setClientCapabilities
This adds a new field to the existing (legacy) setClientCapabilities parameters that accepts an LSP ClientCapabilities.
This will allow a legacy client to indicate that it supports things like the `workspace/applyEdit` reverse-request.
Change-Id: Ia3b75c701f1699c92f902e058daec4844ce664fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/404106
Reviewed-by: Brian Wilkerson <[email protected]>
Reviewed-by: Phil Quitslund <[email protected]>
Commit-Queue: Phil Quitslund <[email protected]>
Copy file name to clipboardExpand all lines: pkg/analysis_server/doc/api.html
+17-1Lines changed: 17 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -110,7 +110,7 @@
110
110
<body>
111
111
<h1>Analysis Server API Specification</h1>
112
112
<h1style="color:#999999">Version
113
-
1.38.0
113
+
1.39.0
114
114
</h1>
115
115
<p>
116
116
This document contains a specification of the API provided by the
@@ -245,6 +245,10 @@ <h3>Enumerations</h3>
245
245
ignoring the item or treating it with some default/fallback handling.
246
246
</p>
247
247
<h3>Changelog</h3>
248
+
<h4>1.39.0</h4>
249
+
<ul>
250
+
<li>Added a new <tt>lspCapabilities</tt> field to the <tt>setClientCapabilities</tt> parameters to allow clients to provide their LSP capabilities. These capabilities can indicate that a client can support <tt>lsp.handle</tt> requests in the server-to-client direction.</li>
251
+
</ul>
248
252
<h4>1.38.0</h4>
249
253
<ul>
250
254
<li>Deprecated the <tt>analytics.enable</tt> request.</li>
Copy file name to clipboardExpand all lines: pkg/analysis_server/tool/spec/spec_input.html
+20-1Lines changed: 20 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@
7
7
<body>
8
8
<h1>Analysis Server API Specification</h1>
9
9
<h1style="color:#999999">Version
10
-
<version>1.38.0</version>
10
+
<version>1.39.0</version>
11
11
</h1>
12
12
<p>
13
13
This document contains a specification of the API provided by the
@@ -142,6 +142,10 @@ <h3>Enumerations</h3>
142
142
ignoring the item or treating it with some default/fallback handling.
143
143
</p>
144
144
<h3>Changelog</h3>
145
+
<h4>1.39.0</h4>
146
+
<ul>
147
+
<li>Added a new <tt>lspCapabilities</tt> field to the <tt>setClientCapabilities</tt> parameters to allow clients to provide their LSP capabilities. These capabilities can indicate that a client can support <tt>lsp.handle</tt> requests in the server-to-client direction.</li>
148
+
</ul>
145
149
<h4>1.38.0</h4>
146
150
<ul>
147
151
<li>Deprecated the <tt>analytics.enable</tt> request.</li>
@@ -427,6 +431,18 @@ <h4>Options</h4>
427
431
LSP notifications are automatically enabled when the client sets this capability.
428
432
</p>
429
433
</field>
434
+
<fieldname="lspCapabilities" optional="true">
435
+
<ref>object</ref>
436
+
<p>
437
+
LSP capabilities of the client as defined by the Language Server Protocol specification.
438
+
</p>
439
+
<p>
440
+
If custom LSP capabilities are to be used, the setClientCapabilities request should be called before any LSP requests are made to the server.
441
+
</p>
442
+
<p>
443
+
If LSP capabilities are not provided or no setClientCapabilities request is made, a very basic set of capabilities will be assumed.
444
+
</p>
445
+
</field>
430
446
</params>
431
447
</request>
432
448
<requestmethod="openUrlRequest">
@@ -3436,6 +3452,9 @@ <h4>Options</h4>
3436
3452
<p>
3437
3453
Call an LSP handler. Message can be requests or notifications.
3438
3454
</p>
3455
+
<p>
3456
+
This request can be called in either direction, either by the client to the server, or by the server to the client. The server will only call the client if the client has indicated it supports the associated LSP request via <tt>lspCapabilities</tt> in the <tt>setClientCapabilities</tt> request.
0 commit comments