aboutsummaryrefslogtreecommitdiff
path: root/docs/dev/lsp-extensions.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/dev/lsp-extensions.md')
-rw-r--r--docs/dev/lsp-extensions.md12
1 files changed, 9 insertions, 3 deletions
diff --git a/docs/dev/lsp-extensions.md b/docs/dev/lsp-extensions.md
index 78d86f060..164c8482e 100644
--- a/docs/dev/lsp-extensions.md
+++ b/docs/dev/lsp-extensions.md
@@ -1,5 +1,5 @@
1<!--- 1<!---
2lsp_ext.rs hash: 91f2c62457e0a20f 2lsp_ext.rs hash: d279d971d4f62cd7
3 3
4If you need to change the above hash to make the test pass, please check if you 4If you need to change the above hash to make the test pass, please check if you
5need to adjust this doc as well and ping this issue: 5need to adjust this doc as well and ping this issue:
@@ -19,6 +19,12 @@ Requests, which are likely to always remain specific to `rust-analyzer` are unde
19 19
20If you want to be notified about the changes to this document, subscribe to [#4604](https://github.com/rust-analyzer/rust-analyzer/issues/4604). 20If you want to be notified about the changes to this document, subscribe to [#4604](https://github.com/rust-analyzer/rust-analyzer/issues/4604).
21 21
22## UTF-8 offsets
23
24rust-analyzer supports clangd's extension for opting into UTF-8 as the coordinate space for offsets (by default, LSP uses UTF-16 offsets).
25
26https://clangd.llvm.org/extensions.html#utf-8-offsets
27
22## `initializationOptions` 28## `initializationOptions`
23 29
24For `initializationOptions`, `rust-analyzer` expects `"rust-analyzer"` section of the configuration. 30For `initializationOptions`, `rust-analyzer` expects `"rust-analyzer"` section of the configuration.
@@ -238,7 +244,7 @@ As proper cursor positioning is raison-d'etat for `onEnter`, it uses `SnippetTex
238* How to deal with synchronicity of the request? 244* How to deal with synchronicity of the request?
239 One option is to require the client to block until the server returns the response. 245 One option is to require the client to block until the server returns the response.
240 Another option is to do a OT-style merging of edits from client and server. 246 Another option is to do a OT-style merging of edits from client and server.
241 A third option is to do a record-replay: client applies heuristic on enter immediatelly, then applies all user's keypresses. 247 A third option is to do a record-replay: client applies heuristic on enter immediately, then applies all user's keypresses.
242 When the server is ready with the response, the client rollbacks all the changes and applies the recorded actions on top of the correct response. 248 When the server is ready with the response, the client rollbacks all the changes and applies the recorded actions on top of the correct response.
243* How to deal with multiple carets? 249* How to deal with multiple carets?
244* Should we extend this to arbitrary typed events and not just `onEnter`? 250* Should we extend this to arbitrary typed events and not just `onEnter`?
@@ -423,7 +429,7 @@ Reloads project information (that is, re-executes `cargo metadata`).
423 429
424```typescript 430```typescript
425interface StatusParams { 431interface StatusParams {
426 status: "loading" | "ready" | "invalid" | "needsReload", 432 status: "loading" | "readyPartial" | "ready" | "invalid" | "needsReload",
427} 433}
428``` 434```
429 435