-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Consider to add indent guide to the result snippets. Since snippets usually include indents and sometimes the indent level is deep, it would be helpful to know the level.
┊ match self.regions.first().copied() {
┊ ┊ Some((s, e)) if o == s && o < e => RegionBoundary::Start,
┊ ┊ Some((_, e)) if o == e => {
┊ ┊ ┊ // When the next region is adjcent, skip changing highlight
┊ ┊ ┊ match self.regions.get(1) {
┊ ┊ ┊ ┊ Some((s, _)) if o == *s => RegionBoundary::NotFound,
┊ ┊ ┊ ┊ _ => RegionBoundary::End,
┊ ┊ ┊ }
┊ ┊ }
┊ ┊ _ => RegionBoundary::NotFound,
┊ }
- Character:
┊
(U+250A) - Color: gutter
- Option:
--no-indent-guide
(indent guide is enabled by default)
Note that this feature is automatically disabled by --ascii-lines
.
Challenges:
- How to calculate indent width?
- Width would be calculated at making chunks from grep matches.
- How to handle tab character?
- How to propagate the calculated indent width to a printer?
I should to confirm that the guides are not so noisy in outputs before implementing this by crafting an example output.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request