Skip to content

feat(ui): Improve stack view preview highlighting and item-wise navigation#2

Merged
mhiro2 merged 6 commits into
mainfrom
feat/stack-view-preview-treesitter
Feb 9, 2026
Merged

feat(ui): Improve stack view preview highlighting and item-wise navigation#2
mhiro2 merged 6 commits into
mainfrom
feat/stack-view-preview-treesitter

Conversation

@mhiro2

@mhiro2 mhiro2 commented Feb 9, 2026

Copy link
Copy Markdown
Owner

Summary

This PR improves Stack View readability and navigation.
It adds Tree-sitter-based syntax highlighting to preview lines while reducing base preview highlight priority to avoid visual noise.
It also updates cursor movement to be stack-item-oriented and prevents the cursor from landing on header lines.

Changes

  • Apply Tree-sitter highlights to preview lines in Stack View
  • Lower base preview highlight priority so Tree-sitter highlights remain readable
  • Dynamically align the preview marker () with each stack item prefix width
  • Change j/k to move by stack item (skip preview/header lines)
  • Change gg/G to jump to first/last stack item
  • Prevent the cursor from landing on header lines such as Stack: N
  • Update stack view key behavior docs in README.md and doc/peekstack.txt
  • Expand tests/stack_view_spec.lua coverage for:
    • Tree-sitter apply/skip/fallback/truncation clamping
    • Dynamic preview alignment
    • Item-wise cursor movement and header-line guard

@mhiro2 mhiro2 self-assigned this Feb 9, 2026
@mhiro2 mhiro2 added the enhancement New feature or request label Feb 9, 2026
@mhiro2 mhiro2 merged commit 89d29d7 into main Feb 9, 2026
3 checks passed
@mhiro2 mhiro2 deleted the feat/stack-view-preview-treesitter branch February 9, 2026 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant