about summary refs log tree commit diff
path: root/docs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2022-04-03 12:03:46 +0000
committerGitHub <noreply@github.com>2022-04-03 12:03:46 +0000
commitbc0825d1358abece6e85b928ea3a197451d083c7 (patch)
tree61debaa0bb83d9668d1a6408af2086634becee69 /docs
parent5b5ca0bd17febc252eb5f4e8d645c1c2ea060279 (diff)
parent553bb7f50aac5d062fd8ba534d18f70aaa9bd25b (diff)
downloadrust-bc0825d1358abece6e85b928ea3a197451d083c7.tar.gz
rust-bc0825d1358abece6e85b928ea3a197451d083c7.zip
Merge #10802
10802: Allow clients to configure the global workspace search limit r=Veykril a=knutwalker

Playing around with [helix](https://helix-editor.com) I realized that the global worksapce symbol search works different compared to vs-code.
Helix requires all possible symbols in one query and does no subsequent refinement searched.
This PR adds a configuration option to override the default search limit with the default being the currently hardocded value.
Helix users can increment this limit for their instance with a config like

```toml
[[language]]
name = "rust"
language-server = { command = "rust-analyzer" }
[language.config]
workspace = { symbol = { search = { limit = 65536 }}}
```

Other editors are not affected by this change.


Co-authored-by: Paul Horn <dev@knutwalker.engineer>
Diffstat (limited to 'docs')
-rw-r--r--docs/user/generated_config.adoc7
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/user/generated_config.adoc b/docs/user/generated_config.adoc
index 1617ac5a7f8..d552982768b 100644
--- a/docs/user/generated_config.adoc
+++ b/docs/user/generated_config.adoc
@@ -558,3 +558,10 @@ Workspace symbol search scope.
 --
 Workspace symbol search kind.
 --
+[[rust-analyzer.workspace.symbol.search.limit]]rust-analyzer.workspace.symbol.search.limit (default: `128`)::
++
+--
+Limits the number of items returned from a workspace symbol search (Defaults to 128).
+Some clients like vs-code issue new searches on result filtering and don't require all results to be returned in the initial search.
+Other clients requires all results upfront and might require a higher limit.
+--