diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-02-16 16:34:22 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-02-16 16:34:22 +0000 |
commit | c9672a0539a59b626619724092077f57c70e6ffe (patch) | |
tree | 77097454dc598a5e0a0b1d98b8c9645b9e213289 /docs | |
parent | f7b7a09f752caba21f2b21ccb8f74421a599d2c6 (diff) | |
parent | 3f09e3fba62839f26da2f27ce27a2335b1dca7ef (diff) |
Merge #7657
7657: utf8 r=matklad a=matklad
- Prepare for utf-8 offsets
- reduce code duplication in tests
- Make utf8 default, implement utf16 in terms of it
- Make it easy to add additional context for offset conversion
- Implement utf8 offsets
closes #7453
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/dev/lsp-extensions.md | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/docs/dev/lsp-extensions.md b/docs/dev/lsp-extensions.md index a4e108724..164c8482e 100644 --- a/docs/dev/lsp-extensions.md +++ b/docs/dev/lsp-extensions.md | |||
@@ -1,5 +1,5 @@ | |||
1 | <!--- | 1 | <!--- |
2 | lsp_ext.rs hash: 34aec6bfeaeb97a | 2 | lsp_ext.rs hash: d279d971d4f62cd7 |
3 | 3 | ||
4 | If you need to change the above hash to make the test pass, please check if you | 4 | If you need to change the above hash to make the test pass, please check if you |
5 | need to adjust this doc as well and ping this issue: | 5 | need 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 | ||
20 | If you want to be notified about the changes to this document, subscribe to [#4604](https://github.com/rust-analyzer/rust-analyzer/issues/4604). | 20 | If 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 | |||
24 | rust-analyzer supports clangd's extension for opting into UTF-8 as the coordinate space for offsets (by default, LSP uses UTF-16 offsets). | ||
25 | |||
26 | https://clangd.llvm.org/extensions.html#utf-8-offsets | ||
27 | |||
22 | ## `initializationOptions` | 28 | ## `initializationOptions` |
23 | 29 | ||
24 | For `initializationOptions`, `rust-analyzer` expects `"rust-analyzer"` section of the configuration. | 30 | For `initializationOptions`, `rust-analyzer` expects `"rust-analyzer"` section of the configuration. |