feat: colored/rainbow indentation guides #76
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Usage
This feature will be opt-in, i.e. disabled by default. Enable it in your
config.toml
as follows:Theming
A theme can define a rainbow palette as follows (e.g. by referencing palette colors):
If a theme does not define or inherit any rainbow palette, a standard color palette will be used.
In this PR the "catppuccin" themes define a custom rainbow palette.
Preview
catppuccin_macchiato:

catppuccin_latte:

image courtesy of the original PR author:

Known issues
Dimming does not work. If
rainbow-option
is set todim
, it will likely act as if set tonormal
.This pull request introduces colored indentation guides, a.k.a. rainbow indentation guides.
This is helix-editor/helix#4493 (which in turn was a continuation of helix-editor/helix#4056), squashed and rebased, and with conflicts resolved.
Note
This makes considerable changes in the upstream implementation, and may never be merged upstream. We may have to refactor this implementation in the near future to avoid further conflicts.
Suggested in #42.