@@ -252,8 +252,6 @@ config_data! {
252252
253253config_data ! {
254254 workspace: struct WorkspaceDefaultConfigData <- WorkspaceConfigInput -> {
255-
256-
257255 /// Pass `--all-targets` to cargo invocation.
258256 cargo_allTargets: bool = true ,
259257 /// Automatically refresh project info via `cargo metadata` on
@@ -447,6 +445,16 @@ config_data! {
447445 /// available on a nightly build.
448446 rustfmt_rangeFormatting_enable: bool = false ,
449447
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+
450458 }
451459}
452460
@@ -731,14 +739,6 @@ config_data! {
731739 /// Whether to insert closing angle brackets when typing an opening angle bracket of a generic argument list.
732740 typing_autoClosingAngleBrackets_enable: bool = false ,
733741
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 ,
742742 }
743743}
744744
@@ -2019,19 +2019,19 @@ impl Config {
20192019 }
20202020 }
20212021
2022- pub fn workspace_symbol ( & self ) -> WorkspaceSymbolConfig {
2022+ pub fn workspace_symbol ( & self , source_root : Option < SourceRootId > ) -> WorkspaceSymbolConfig {
20232023 WorkspaceSymbolConfig {
2024- search_scope : match self . workspace_symbol_search_scope ( ) {
2024+ search_scope : match self . workspace_symbol_search_scope ( source_root ) {
20252025 WorkspaceSymbolSearchScopeDef :: Workspace => WorkspaceSymbolSearchScope :: Workspace ,
20262026 WorkspaceSymbolSearchScopeDef :: WorkspaceAndDependencies => {
20272027 WorkspaceSymbolSearchScope :: WorkspaceAndDependencies
20282028 }
20292029 } ,
2030- search_kind : match self . workspace_symbol_search_kind ( ) {
2030+ search_kind : match self . workspace_symbol_search_kind ( source_root ) {
20312031 WorkspaceSymbolSearchKindDef :: OnlyTypes => WorkspaceSymbolSearchKind :: OnlyTypes ,
20322032 WorkspaceSymbolSearchKindDef :: AllSymbols => WorkspaceSymbolSearchKind :: AllSymbols ,
20332033 } ,
2034- search_limit : * self . workspace_symbol_search_limit ( ) ,
2034+ search_limit : * self . workspace_symbol_search_limit ( source_root ) ,
20352035 }
20362036 }
20372037
0 commit comments