Skip to content

feat: per-depth highlighting for context lines #655

Description

@TheRickyZhang

When multiple context entries are displayed, it can be difficult to visually distinguish between nesting levels, particularly when a single entry can span multiple lines, since everything shares the same TreesitterContext highlight group.

Proposed Solution: per-depth highlight groups

  • Expose highlight groups like TreesitterContextLevel1, TreesitterContextLevel2, etc., allowing users to set distinct background colors per nesting level.

Implementation Notes

  • I have not looked at the code too deeply, but the depth information seems to already available during tree-sitter traversal.
  • Mostly use nvim_buf_add_highlight() with depth-based highlight groups?

Would this be helpful and feasible?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions