diff options
| author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2022-04-03 12:03:46 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-03 12:03:46 +0000 |
| commit | bc0825d1358abece6e85b928ea3a197451d083c7 (patch) | |
| tree | 61debaa0bb83d9668d1a6408af2086634becee69 /editors/code | |
| parent | 5b5ca0bd17febc252eb5f4e8d645c1c2ea060279 (diff) | |
| parent | 553bb7f50aac5d062fd8ba534d18f70aaa9bd25b (diff) | |
| download | rust-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 'editors/code')
| -rw-r--r-- | editors/code/package.json | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/editors/code/package.json b/editors/code/package.json index a62b80b461f..b7bc60a3b8b 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -1014,6 +1014,12 @@ "Search for all symbols kinds" ] }, + "rust-analyzer.workspace.symbol.search.limit": { + "markdownDescription": "Limits the number of items returned from a workspace symbol search (Defaults to 128).\nSome clients like vs-code issue new searches on result filtering and don't require all results to be returned in the initial search.\nOther clients requires all results upfront and might require a higher limit.", + "default": 128, + "type": "integer", + "minimum": 0 + }, "$generated-end": {} } }, |
