Skip to content

[audit] scopeline.lua: virt_text uses {} as highlight — scope line may be invisible in some themes #134

Description

@stanfish06

What

lua/config/scopeline.lua:55 passes an empty table {} as the highlight group for the virtual scope-line character:

{ virt_text = { { "|", {} } }, virt_text_pos = "overlay" }

nvim_buf_set_extmark accepts a highlight group name (string) or list of group names as the second element of each virt_text chunk. An empty table {} means "no highlight group", so the | inherits the foreground colour of whatever text sits at that screen column. In practice this makes scope lines nearly invisible in most colour schemes because they blend into the code.

Where

lua/config/scopeline.lua, line 55 (the nvim_buf_set_extmark call inside draw_scope_lines).

Why it matters

The scope-line feature is only useful if the | is distinguishable. Right now it silently renders with no dedicated colour.

Recommended action

Replace {} with a real highlight group. The built-in "NonText" or "Comment" group is a natural choice (dimmed, not distracting):

{ virt_text = { { "|", "NonText" } }, virt_text_pos = "overlay" }

Alternatively, define a dedicated ScopeLine highlight in the ColorScheme autocmd in statusline.lua for full control over the colour.

Activity

  1. added a commit that references this issue on Jun 7, 2026
    e862a19
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

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions