aboutsummaryrefslogtreecommitdiff
path: root/crates/rust-analyzer/src/config.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/rust-analyzer/src/config.rs')
-rw-r--r--crates/rust-analyzer/src/config.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs
index c135913e2..37487b6ac 100644
--- a/crates/rust-analyzer/src/config.rs
+++ b/crates/rust-analyzer/src/config.rs
@@ -105,6 +105,8 @@ config_data! {
105 105
106 /// Controls file watching implementation. 106 /// Controls file watching implementation.
107 files_watcher: String = "\"client\"", 107 files_watcher: String = "\"client\"",
108 /// These directories will be ignored by rust-analyzer.
109 files_excludeDirs: Vec<PathBuf> = "[]",
108 110
109 /// Whether to show `Debug` action. Only applies when 111 /// Whether to show `Debug` action. Only applies when
110 /// `#rust-analyzer.hoverActions.enable#` is set. 112 /// `#rust-analyzer.hoverActions.enable#` is set.
@@ -248,7 +250,7 @@ impl LensConfig {
248#[derive(Debug, Clone)] 250#[derive(Debug, Clone)]
249pub struct FilesConfig { 251pub struct FilesConfig {
250 pub watcher: FilesWatcher, 252 pub watcher: FilesWatcher,
251 pub exclude: Vec<String>, 253 pub exclude: Vec<AbsPathBuf>,
252} 254}
253 255
254#[derive(Debug, Clone)] 256#[derive(Debug, Clone)]
@@ -458,7 +460,7 @@ impl Config {
458 "notify" => FilesWatcher::Notify, 460 "notify" => FilesWatcher::Notify,
459 "client" | _ => FilesWatcher::Client, 461 "client" | _ => FilesWatcher::Client,
460 }, 462 },
461 exclude: Vec::new(), 463 exclude: self.data.files_excludeDirs.iter().map(|it| self.root_path.join(it)).collect(),
462 } 464 }
463 } 465 }
464 pub fn notifications(&self) -> NotificationsConfig { 466 pub fn notifications(&self) -> NotificationsConfig {
@@ -763,6 +765,10 @@ fn field_props(field: &str, ty: &str, doc: &[&str], default: &str) -> serde_json
763 "type": "array", 765 "type": "array",
764 "items": { "type": "string" }, 766 "items": { "type": "string" },
765 }, 767 },
768 "Vec<PathBuf>" => set! {
769 "type": "array",
770 "items": { "type": "string" },
771 },
766 "FxHashSet<String>" => set! { 772 "FxHashSet<String>" => set! {
767 "type": "array", 773 "type": "array",
768 "items": { "type": "string" }, 774 "items": { "type": "string" },