mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 04:53:34 +00:00
fixes
This commit is contained in:
parent
773f9b38e3
commit
f7f4792f4f
4 changed files with 14 additions and 17 deletions
|
@ -118,8 +118,6 @@ pub(crate) fn find_all_refs(
|
|||
}
|
||||
|
||||
fn filter_import_references(usages: &mut UsageSearchResult) {
|
||||
// todo use this https://github.com/rust-lang/rust-analyzer/blob/master/crates/rust-analyzer/src/config.rs#L432
|
||||
|
||||
for (_file_id, refs) in &mut usages.references {
|
||||
refs.retain(|it| match it.name.as_name_ref() {
|
||||
Some(name_ref) => {
|
||||
|
|
|
@ -219,10 +219,6 @@ config_data! {
|
|||
files_excludeDirs: Vec<PathBuf> = "[]",
|
||||
/// Controls file watching implementation.
|
||||
files_watcher: FilesWatcherDef = "\"client\"",
|
||||
|
||||
/// Exclude imports from find-all-references.
|
||||
findAllRefs_excludeImports: bool = "false",
|
||||
|
||||
/// Enables highlighting of related references while the cursor is on `break`, `loop`, `while`, or `for` keywords.
|
||||
highlightRelated_breakPoints_enable: bool = "true",
|
||||
/// Enables highlighting of all exit points while the cursor is on any `return`, `?`, `fn`, or return type arrow (`->`).
|
||||
|
@ -362,6 +358,9 @@ config_data! {
|
|||
/// this is rust-analyzer itself, but we override this in tests).
|
||||
procMacro_server: Option<PathBuf> = "null",
|
||||
|
||||
/// Exclude imports from find-all-references.
|
||||
references_excludeImports: bool = "false",
|
||||
|
||||
/// Command to be executed instead of 'cargo' for runnables.
|
||||
runnables_command: Option<String> = "null",
|
||||
/// Additional arguments to be passed to cargo for runnables such as
|
||||
|
@ -1151,7 +1150,7 @@ impl Config {
|
|||
}
|
||||
|
||||
pub fn find_all_refs_exclude_imports(&self) -> bool {
|
||||
self.data.findAllRefs_excludeImports
|
||||
self.data.references_excludeImports
|
||||
}
|
||||
|
||||
pub fn snippet_cap(&self) -> bool {
|
||||
|
|
|
@ -262,11 +262,6 @@ also need to add the folders to Code's `files.watcherExclude`.
|
|||
--
|
||||
Controls file watching implementation.
|
||||
--
|
||||
[[rust-analyzer.findAllRefs.excludeImports]]rust-analyzer.findAllRefs.excludeImports (default: `false`)::
|
||||
+
|
||||
--
|
||||
Exclude imports from find-all-references.
|
||||
--
|
||||
[[rust-analyzer.highlightRelated.breakPoints.enable]]rust-analyzer.highlightRelated.breakPoints.enable (default: `true`)::
|
||||
+
|
||||
--
|
||||
|
@ -551,6 +546,11 @@ This config takes a map of crate names with the exported proc-macro names to ign
|
|||
Internal config, path to proc-macro server executable (typically,
|
||||
this is rust-analyzer itself, but we override this in tests).
|
||||
--
|
||||
[[rust-analyzer.references.excludeImports]]rust-analyzer.references.excludeImports (default: `false`)::
|
||||
+
|
||||
--
|
||||
Exclude imports from find-all-references.
|
||||
--
|
||||
[[rust-analyzer.runnables.command]]rust-analyzer.runnables.command (default: `null`)::
|
||||
+
|
||||
--
|
||||
|
|
|
@ -706,11 +706,6 @@
|
|||
"Use server-side file watching"
|
||||
]
|
||||
},
|
||||
"rust-analyzer.findAllRefs.excludeImports": {
|
||||
"markdownDescription": "Exclude imports from find-all-references.",
|
||||
"default": false,
|
||||
"type": "boolean"
|
||||
},
|
||||
"rust-analyzer.highlightRelated.breakPoints.enable": {
|
||||
"markdownDescription": "Enables highlighting of related references while the cursor is on `break`, `loop`, `while`, or `for` keywords.",
|
||||
"default": true,
|
||||
|
@ -1041,6 +1036,11 @@
|
|||
"string"
|
||||
]
|
||||
},
|
||||
"rust-analyzer.references.excludeImports": {
|
||||
"markdownDescription": "Exclude imports from find-all-references.",
|
||||
"default": false,
|
||||
"type": "boolean"
|
||||
},
|
||||
"rust-analyzer.runnables.command": {
|
||||
"markdownDescription": "Command to be executed instead of 'cargo' for runnables.",
|
||||
"default": null,
|
||||
|
|
Loading…
Reference in a new issue