Draft: implement indentation as virtual text - #584
Open
jakubbortlik wants to merge 1 commit into
Open
Conversation
jakubbortlik
commented
Aug 21, 2026
| -- that also wipes the custom GitlabUsername/GitlabDate/etc. groups from | ||
| -- after/syntax/gitlab.vim, which aren't defined by the markdown parser. Reload them on top. | ||
| vim.bo[bufnr].syntax = "gitlab" | ||
| end |
Collaborator
Author
There was a problem hiding this comment.
Won't this also reload the markdown syntax? Most of the groups are gone anyway...
jakubbortlik
force-pushed
the
feat/implement-indentation-as-virtual-text
branch
from
September 10, 2026 12:04
a8ec17a to
225d1b5
Compare
The indentation is drawn as virtual text and the icon was only ever used for its display width, which had to be kept in sync by hand with the width of the expander icons. Take a number of columns instead. BREAKING CHANGE: discussion_tree.expanders.indentation is replaced by discussion_tree.indent_width. :checkhealth reports the removed setting. feat: draw the expander as virtual text The whole indent region is virtual now, so a buffer line holds nothing but the note's own text: yanking a header no longer picks up the expander icon and the cursor cannot sit on it. A node's text starts at depth * width, with the expander drawn inside the node's own level, which keeps headers aligned with the bodies and replies under them whatever the expander icons are. A level grows to fit an expander wider than indent_width. feat: add indent guides to the discussion tree Guides tie a discussion's replies to the note that started it, with the last reply closing the thread, so that separate discussions can be told apart at a glance. They are drawn as part of the virtual indentation and so cost no columns and never enter the buffer. Only a discussion's root note produces them: a reply's body is not joined to the reply's own header. Set discussion_tree.indent_guides to false to turn off. fixup: only insert indents on wrapped lines when 'wrap' is on
jakubbortlik
force-pushed
the
feat/implement-indentation-as-virtual-text
branch
from
September 11, 2026 00:23
225d1b5 to
c7a27ca
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR re-implements the discussion tree indentation as virtual text. This has several benefits:
after/syntax/gitlab.vim.It already works well, but needs a thorough review and should add unit tests.