From 4a9d1163e04ba0fc29f8532afd35381b7df55e48 Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Fri, 14 May 2021 19:21:46 +0900 Subject: Hacky way to specify indent scopes per language via toml configs. Can't do it via a scm query nicely because it returns an iterator over all the matches, whereas we want to traverse the tree ourselves. Can't extract the pattern data from a parsed query either. Oh well, toml files for now. --- helix-view/src/document.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'helix-view/src') diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs index 8d6144cf..814777f8 100644 --- a/helix-view/src/document.rs +++ b/helix-view/src/document.rs @@ -328,6 +328,11 @@ impl Document { .map(|language| language.scope.as_str()) } + #[inline] + pub fn language_config(&self) -> Option<&LanguageConfiguration> { + self.language.as_deref() + } + #[inline] /// Current document version, incremented at each change. pub fn version(&self) -> i32 { -- cgit v1.2.3-70-g09d2