diff options
author | Blaž Hrastnik | 2021-05-14 10:21:46 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-05-14 10:21:46 +0000 |
commit | 4a9d1163e04ba0fc29f8532afd35381b7df55e48 (patch) | |
tree | 7b8413c60c267d0a06ddbfa18e1d367b4b6d2309 /helix-view/src | |
parent | 726072085d019b1ce9e3cdf4e1557a1148723482 (diff) |
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.
Diffstat (limited to 'helix-view/src')
-rw-r--r-- | helix-view/src/document.rs | 5 |
1 files changed, 5 insertions, 0 deletions
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 @@ -329,6 +329,11 @@ impl Document { } #[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 { self.version |