Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-view/src/document.rs')
-rw-r--r--helix-view/src/document.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs
index 2fff2347..04b7703c 100644
--- a/helix-view/src/document.rs
+++ b/helix-view/src/document.rs
@@ -1810,6 +1810,12 @@ impl Document {
self.version
}
+ pub fn word_completion_enabled(&self) -> bool {
+ self.language_config()
+ .and_then(|lang_config| lang_config.word_completion.and_then(|c| c.enable))
+ .unwrap_or_else(|| self.config.load().word_completion.enable)
+ }
+
pub fn path_completion_enabled(&self) -> bool {
self.language_config()
.and_then(|lang_config| lang_config.path_completion)