diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/dev/lsp-extensions.md | 20 | ||||
-rw-r--r-- | docs/user/generated_config.adoc | 9 | ||||
-rw-r--r-- | docs/user/manual.adoc | 2 |
3 files changed, 26 insertions, 5 deletions
diff --git a/docs/dev/lsp-extensions.md b/docs/dev/lsp-extensions.md index 3c4eacfeb..fbe2ce1c9 100644 --- a/docs/dev/lsp-extensions.md +++ b/docs/dev/lsp-extensions.md | |||
@@ -1,5 +1,5 @@ | |||
1 | <!--- | 1 | <!--- |
2 | lsp_ext.rs hash: 10a8988e6893e6b2 | 2 | lsp_ext.rs hash: 49f253e4a9307d4f |
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: |
@@ -464,7 +464,7 @@ Clients are discouraged from but are allowed to use the `health` status to decid | |||
464 | **Request:** | 464 | **Request:** |
465 | 465 | ||
466 | ```typescript | 466 | ```typescript |
467 | interface SyntaxTeeParams { | 467 | interface SyntaxTreeParams { |
468 | textDocument: TextDocumentIdentifier, | 468 | textDocument: TextDocumentIdentifier, |
469 | range?: Range, | 469 | range?: Range, |
470 | } | 470 | } |
@@ -486,6 +486,22 @@ Primarily for debugging, but very useful for all people working on rust-analyzer | |||
486 | Returns a textual representation of the HIR of the function containing the cursor. | 486 | Returns a textual representation of the HIR of the function containing the cursor. |
487 | For debugging or when working on rust-analyzer itself. | 487 | For debugging or when working on rust-analyzer itself. |
488 | 488 | ||
489 | ## View ItemTree | ||
490 | |||
491 | **Method:** `rust-analyzer/viewItemTree` | ||
492 | |||
493 | **Request:** | ||
494 | |||
495 | ```typescript | ||
496 | interface ViewItemTreeParams { | ||
497 | textDocument: TextDocumentIdentifier, | ||
498 | } | ||
499 | ``` | ||
500 | |||
501 | **Response:** `string` | ||
502 | |||
503 | Returns a textual representation of the `ItemTree` of the currently open file, for debugging. | ||
504 | |||
489 | ## View Crate Graph | 505 | ## View Crate Graph |
490 | 506 | ||
491 | **Method:** `rust-analyzer/viewCrateGraph` | 507 | **Method:** `rust-analyzer/viewCrateGraph` |
diff --git a/docs/user/generated_config.adoc b/docs/user/generated_config.adoc index b32411887..c02bab7cc 100644 --- a/docs/user/generated_config.adoc +++ b/docs/user/generated_config.adoc | |||
@@ -1,7 +1,12 @@ | |||
1 | [[rust-analyzer.assist.importMergeBehavior]]rust-analyzer.assist.importMergeBehavior (default: `"crate"`):: | 1 | [[rust-analyzer.assist.importGranularity]]rust-analyzer.assist.importGranularity (default: `"crate"`):: |
2 | + | 2 | + |
3 | -- | 3 | -- |
4 | The strategy to use when inserting new imports or merging imports. | 4 | How imports should be grouped into use statements. |
5 | -- | ||
6 | [[rust-analyzer.assist.importEnforceGranularity]]rust-analyzer.assist.importEnforceGranularity (default: `false`):: | ||
7 | + | ||
8 | -- | ||
9 | Whether to enforce the import granularity setting for all files. If set to false rust-analyzer will try to keep import styles consistent per file. | ||
5 | -- | 10 | -- |
6 | [[rust-analyzer.assist.importPrefix]]rust-analyzer.assist.importPrefix (default: `"plain"`):: | 11 | [[rust-analyzer.assist.importPrefix]]rust-analyzer.assist.importPrefix (default: `"plain"`):: |
7 | + | 12 | + |
diff --git a/docs/user/manual.adoc b/docs/user/manual.adoc index f96c09a79..1d8a1930a 100644 --- a/docs/user/manual.adoc +++ b/docs/user/manual.adoc | |||
@@ -276,7 +276,7 @@ nvim_lsp.rust_analyzer.setup({ | |||
276 | settings = { | 276 | settings = { |
277 | ["rust-analyzer"] = { | 277 | ["rust-analyzer"] = { |
278 | assist = { | 278 | assist = { |
279 | importMergeBehavior = "last", | 279 | importGranularity = "module", |
280 | importPrefix = "by_self", | 280 | importPrefix = "by_self", |
281 | }, | 281 | }, |
282 | cargo = { | 282 | cargo = { |