Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-core/src/syntax/config.rs')
| -rw-r--r-- | helix-core/src/syntax/config.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/helix-core/src/syntax/config.rs b/helix-core/src/syntax/config.rs index 432611bb..ddff26f1 100644 --- a/helix-core/src/syntax/config.rs +++ b/helix-core/src/syntax/config.rs @@ -7,6 +7,7 @@ use serde::{ser::SerializeSeq as _, Deserialize, Serialize}; use std::{ collections::{HashMap, HashSet}, fmt::{self, Display}, + num::NonZeroU8, path::PathBuf, str::FromStr, }; @@ -60,6 +61,8 @@ pub struct LanguageConfiguration { /// If set, overrides `editor.path-completion`. pub path_completion: Option<bool>, + /// If set, overrides `editor.word-completion`. + pub word_completion: Option<WordCompletion>, #[serde(default)] pub diagnostic_severity: Severity, @@ -572,6 +575,13 @@ pub struct SoftWrap { pub wrap_at_text_width: Option<bool>, } +#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Serialize, Deserialize)] +#[serde(default, rename_all = "kebab-case", deny_unknown_fields)] +pub struct WordCompletion { + pub enable: Option<bool>, + pub trigger_length: Option<NonZeroU8>, +} + fn deserialize_regex<'de, D>(deserializer: D) -> Result<Option<rope::Regex>, D::Error> where D: serde::Deserializer<'de>, |