aboutsummaryrefslogtreecommitdiff
path: root/docs/dev
diff options
context:
space:
mode:
authorDavid Lattimore <[email protected]>2020-07-22 06:00:28 +0100
committerDavid Lattimore <[email protected]>2020-07-24 12:34:00 +0100
commit3975952601888d9f77e466c12e8e389748984b33 (patch)
treee599abf34b90be63e091ea78bfa58fe46cf1b81a /docs/dev
parent02fc3d50ee4d179cc5a443a790544c2a5e439cb0 (diff)
SSR: Pass current file position through to SSR code.
In a subsequent commit, it will be used for resolving paths.
Diffstat (limited to 'docs/dev')
-rw-r--r--docs/dev/lsp-extensions.md7
1 files changed, 6 insertions, 1 deletions
diff --git a/docs/dev/lsp-extensions.md b/docs/dev/lsp-extensions.md
index 98d14450b..1be01fd88 100644
--- a/docs/dev/lsp-extensions.md
+++ b/docs/dev/lsp-extensions.md
@@ -274,6 +274,11 @@ interface SsrParams {
274 query: string, 274 query: string,
275 /// If true, only check the syntax of the query and don't compute the actual edit. 275 /// If true, only check the syntax of the query and don't compute the actual edit.
276 parseOnly: bool, 276 parseOnly: bool,
277 /// The current text document. This and `position` will be used to determine in what scope
278 /// paths in `query` should be resolved.
279 textDocument: lc.TextDocumentIdentifier;
280 /// Position where SSR was invoked.
281 position: lc.Position;
277} 282}
278``` 283```
279 284
@@ -285,7 +290,7 @@ WorkspaceEdit
285 290
286### Example 291### Example
287 292
288SSR with query `foo($a:expr, $b:expr) ==>> ($a).foo($b)` will transform, eg `foo(y + 5, z)` into `(y + 5).foo(z)`. 293SSR with query `foo($a, $b) ==>> ($a).foo($b)` will transform, eg `foo(y + 5, z)` into `(y + 5).foo(z)`.
289 294
290### Unresolved Question 295### Unresolved Question
291 296