Skip to content

[audit] snacks.nvim indent/scope chunks and scopeline.lua extmarks render on the same column #264

Description

@stanfish06

What

Two separate scope-visualization systems are active at the same time:

  1. snacks.nvim indent + chunk (plugin_config.lua:403–421): draws indent guides and a highlighted "chunk" block (leading corner/trailing corner) around the current treesitter scope, globally on every line.

  2. scopeline.lua (lua/config/scopeline.lua): draws // overlay extmarks at the indentation column of the innermost scope node under the cursor, via virt_text_pos = "overlay" and virt_text_win_col = start_col.

Both pick the same horizontal position (the indentation level of the active scope) and fire on CursorMoved. The overlay extmarks from scopeline.lua paint directly over whatever snacks rendered at that column — the result is visual collision: the snacks chunk corner character disappears under the scopeline , or the scopeline overwrites a snacks .

Where

  • lua/config/plugin_config.lua:403–421 — snacks indent/chunk config
  • lua/config/scopeline.lua:50–67 — extmark placement with virt_text_pos = "overlay"

Why it matters

At minimum the two systems are redundant; at worst the overlay collision makes the scope indicator unreadable and causes visual flicker on every cursor move (snacks redraws its guides; scopeline clears its namespace and redraws its extmarks).

Recommended action

Choose one:

  • Keep snacks only: remove scopeline.lua and its require from init.lua. Snacks' chunk mode already draws the corner+bar visual around the current scope.
  • Keep scopeline only: disable indent.scope and indent.chunk in the snacks setup (set scope.enabled = false, chunk.enabled = false) to stop snacks from drawing the competing overlapping guide.
  • Keep both, fix the column conflict: change scopeline's virt_text_pos to "eol" or "right_align" so it doesn't paint over the indent column — though this changes its visual meaning.

The simplest option for now is keeping snacks (feature-rich, maintained) and removing the custom scopeline.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions