Skip to content

Commit

Permalink
document offsets
Browse files Browse the repository at this point in the history
  • Loading branch information
matklad committed Feb 16, 2021
1 parent b8934e4 commit 88fe03d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions crates/rust-analyzer/src/caps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ pub fn server_capabilities(client_caps: &ClientCapabilities) -> ServerCapabiliti
all_commit_characters: None,
completion_item: None,
work_done_progress_options: WorkDoneProgressOptions { work_done_progress: None },
all_commit_characters: None,
completion_item: None,
}),
signature_help_provider: Some(SignatureHelpOptions {
trigger_characters: Some(vec!["(".to_string(), ",".to_string()]),
Expand Down
8 changes: 7 additions & 1 deletion docs/dev/lsp-extensions.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!---
lsp_ext.rs hash: 34aec6bfeaeb97a
lsp_ext.rs hash: d279d971d4f62cd7
If you need to change the above hash to make the test pass, please check if you
need to adjust this doc as well and ping this issue:
Expand All @@ -19,6 +19,12 @@ Requests, which are likely to always remain specific to `rust-analyzer` are unde

If you want to be notified about the changes to this document, subscribe to [#4604](https://github.com/rust-analyzer/rust-analyzer/issues/4604).

## UTF-8 offsets

rust-analyzer supports clangd's extension for opting into UTF-8 as the coordinate space for offsets (by default, LSP uses UTF-16 offsets).

https://clangd.llvm.org/extensions.html#utf-8-offsets

## `initializationOptions`

For `initializationOptions`, `rust-analyzer` expects `"rust-analyzer"` section of the configuration.
Expand Down

0 comments on commit 88fe03d

Please sign in to comment.