allow to exclude certain files and directories

This commit is contained in:
Aleksey Kladov 2019-08-06 13:34:28 +02:00
parent 058c2daba1
commit deea8f52d9
7 changed files with 43 additions and 15 deletions

View file

@ -1,7 +1,7 @@
use serde::{Deserialize, Deserializer};
/// Client provided initialization options
#[derive(Deserialize, Clone, Copy, Debug, PartialEq, Eq)]
#[derive(Deserialize, Clone, Debug, PartialEq, Eq)]
#[serde(rename_all = "camelCase", default)]
pub struct ServerConfig {
/// Whether the client supports our custom highlighting publishing decorations.
@ -18,12 +18,19 @@ pub struct ServerConfig {
#[serde(deserialize_with = "nullable_bool_true")]
pub show_workspace_loaded: bool,
pub exclude_globs: Vec<String>,
pub lru_capacity: Option<usize>,
}
impl Default for ServerConfig {
fn default() -> ServerConfig {
ServerConfig { publish_decorations: false, show_workspace_loaded: true, lru_capacity: None }
ServerConfig {
publish_decorations: false,
show_workspace_loaded: true,
exclude_globs: Vec::new(),
lru_capacity: None,
}
}
}