diff options
Diffstat (limited to 'helix-view/src/document.rs')
-rw-r--r-- | helix-view/src/document.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs index a0d50440..84c92320 100644 --- a/helix-view/src/document.rs +++ b/helix-view/src/document.rs @@ -683,9 +683,13 @@ impl Document { &mut self, language_id: &str, config_loader: Arc<syntax::Loader>, - ) { + ) -> bool { let language_config = config_loader.language_config_for_language_id(language_id); + if language_config.is_none() { + return false; + } self.set_language(language_config, Some(config_loader)); + true } /// Set the LSP. |