diff options
author | JJ | 2023-11-01 01:00:19 +0000 |
---|---|---|
committer | JJ | 2023-11-01 04:08:32 +0000 |
commit | eaf8d6d30da5014a3c475c4187b9dccfe621afd5 (patch) | |
tree | dd1d64f6b72b27256caa988120ab3075d08a9c69 /helix-view/src/editor.rs | |
parent | 5c371208692df2727d02a37646b7829f011680a8 (diff) |
Add rainbow tree-sitter highlights
ref: https://github.com/helix-editor/helix/issues/695
ref: https://github.com/helix-editor/helix/pull/2857
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
Diffstat (limited to 'helix-view/src/editor.rs')
-rw-r--r-- | helix-view/src/editor.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index f285aa99..fbfed656 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -308,6 +308,8 @@ pub struct Config { pub explorer: ExplorerConfig, /// Whether to color modes with different colors. Defaults to `false`. pub color_modes: bool, + /// Whether to render rainbow highlights. Defaults to `false`. + pub rainbow_brackets: bool, pub soft_wrap: SoftWrap, /// Workspace specific lsp ceiling dirs pub workspace_lsp_roots: Vec<PathBuf>, @@ -863,6 +865,7 @@ impl Default for Config { indent_guides: IndentGuidesConfig::default(), explorer: ExplorerConfig::default(), color_modes: false, + rainbow_brackets: false, soft_wrap: SoftWrap { enable: Some(false), ..SoftWrap::default() @@ -1203,8 +1206,7 @@ impl Editor { return; } - let scopes = theme.scopes(); - self.syn_loader.set_scopes(scopes.to_vec()); + self.syn_loader.set_scopes(theme.scopes().to_vec()); match preview { ThemeAction::Preview => { |