@@ -252,8 +252,6 @@ config_data! {
252
252
253
253
config_data ! {
254
254
workspace: struct WorkspaceDefaultConfigData <- WorkspaceConfigInput -> {
255
-
256
-
257
255
/// Pass `--all-targets` to cargo invocation.
258
256
cargo_allTargets: bool = true ,
259
257
/// Automatically refresh project info via `cargo metadata` on
@@ -447,6 +445,16 @@ config_data! {
447
445
/// available on a nightly build.
448
446
rustfmt_rangeFormatting_enable: bool = false ,
449
447
448
+
449
+ /// Workspace symbol search kind.
450
+ workspace_symbol_search_kind: WorkspaceSymbolSearchKindDef = WorkspaceSymbolSearchKindDef :: OnlyTypes ,
451
+ /// Limits the number of items returned from a workspace symbol search (Defaults to 128).
452
+ /// Some clients like vs-code issue new searches on result filtering and don't require all results to be returned in the initial search.
453
+ /// Other clients requires all results upfront and might require a higher limit.
454
+ workspace_symbol_search_limit: usize = 128 ,
455
+ /// Workspace symbol search scope.
456
+ workspace_symbol_search_scope: WorkspaceSymbolSearchScopeDef = WorkspaceSymbolSearchScopeDef :: Workspace ,
457
+
450
458
}
451
459
}
452
460
@@ -731,14 +739,6 @@ config_data! {
731
739
/// Whether to insert closing angle brackets when typing an opening angle bracket of a generic argument list.
732
740
typing_autoClosingAngleBrackets_enable: bool = false ,
733
741
734
- /// Workspace symbol search kind.
735
- workspace_symbol_search_kind: WorkspaceSymbolSearchKindDef = WorkspaceSymbolSearchKindDef :: OnlyTypes ,
736
- /// Limits the number of items returned from a workspace symbol search (Defaults to 128).
737
- /// Some clients like vs-code issue new searches on result filtering and don't require all results to be returned in the initial search.
738
- /// Other clients requires all results upfront and might require a higher limit.
739
- workspace_symbol_search_limit: usize = 128 ,
740
- /// Workspace symbol search scope.
741
- workspace_symbol_search_scope: WorkspaceSymbolSearchScopeDef = WorkspaceSymbolSearchScopeDef :: Workspace ,
742
742
}
743
743
}
744
744
@@ -2019,19 +2019,19 @@ impl Config {
2019
2019
}
2020
2020
}
2021
2021
2022
- pub fn workspace_symbol ( & self ) -> WorkspaceSymbolConfig {
2022
+ pub fn workspace_symbol ( & self , source_root : Option < SourceRootId > ) -> WorkspaceSymbolConfig {
2023
2023
WorkspaceSymbolConfig {
2024
- search_scope : match self . workspace_symbol_search_scope ( ) {
2024
+ search_scope : match self . workspace_symbol_search_scope ( source_root ) {
2025
2025
WorkspaceSymbolSearchScopeDef :: Workspace => WorkspaceSymbolSearchScope :: Workspace ,
2026
2026
WorkspaceSymbolSearchScopeDef :: WorkspaceAndDependencies => {
2027
2027
WorkspaceSymbolSearchScope :: WorkspaceAndDependencies
2028
2028
}
2029
2029
} ,
2030
- search_kind : match self . workspace_symbol_search_kind ( ) {
2030
+ search_kind : match self . workspace_symbol_search_kind ( source_root ) {
2031
2031
WorkspaceSymbolSearchKindDef :: OnlyTypes => WorkspaceSymbolSearchKind :: OnlyTypes ,
2032
2032
WorkspaceSymbolSearchKindDef :: AllSymbols => WorkspaceSymbolSearchKind :: AllSymbols ,
2033
2033
} ,
2034
- search_limit : * self . workspace_symbol_search_limit ( ) ,
2034
+ search_limit : * self . workspace_symbol_search_limit ( source_root ) ,
2035
2035
}
2036
2036
}
2037
2037
0 commit comments