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
This change adds an optional range field to textDocumentPositionParams
so that clients can, for example, query a subexpression such as
x.f within a larger expression g(x.f[i]).
Also, clarify the text about cursor bias.
Fixes#377Fixes#1029
Copy file name to clipboardExpand all lines: _specifications/lsp/3.18/types/textDocumentPositionParams.md
+19-2
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,18 @@
2
2
3
3
Was `TextDocumentPosition` in 1.0 with inlined parameters.
4
4
5
-
A parameter literal used in requests to pass a text document and a position inside that document. It is up to the client to decide how a selection is converted into a position when issuing a request for a text document. The client can, for example, honor or ignore the selection direction to make LSP request consistent with features implemented internally.
5
+
A parameter literal used in requests to pass a text document and a
6
+
position or optional range within that document.
7
+
8
+
To be consistent with features implemented internally, the client is
9
+
free to choose for each LSP request how a cursor position or text
10
+
selection is converted into a position or range.
11
+
For example, some editors display the cursor as a caret at the current
12
+
insertion point between characters (`A|BC`), whereas others display it
13
+
as a box around the character after the insertion point (`A🄱C`).
14
+
Depending on the operation, in the absence of a selection range,
15
+
editors of the second kind may choose to interpret the cursor position
16
+
as an implicit selection of the character _after_ the position.
0 commit comments