Skip to content

fix(indent): underline highlight at correct column when tabs indent - #2935

Open
iammimikri wants to merge 1 commit into
folke:mainfrom
iammimikri:indent-tabs-fix
Open

fix(indent): underline highlight at correct column when tabs indent#2935
iammimikri wants to merge 1 commit into
folke:mainfrom
iammimikri:indent-tabs-fix

Conversation

@iammimikri

Copy link
Copy Markdown

Description

  • indent plugin can't correctly underline first line of indent if user indents with tabs instead of spaces
  • reason
    • user setting not checked and beginning of highlight moved by shiftwidth
    • e.g.: if shiftwidth is 4 then one indent highlight begins at col 3, two indents highlight begins at col 6 etc.
  • solution
    • check if user has vim.bo.expandtab set
    • if true divide and round down start column by shiftwidth

Related Issue(s)

#404

@github-actions github-actions Bot added indent size/s Small PR (<10 lines changed) labels Aug 15, 2026
@iammimikri iammimikri changed the title underline tab indents fix fix(indent): underline highlight at correct column when tabs indent Aug 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

indent size/s Small PR (<10 lines changed)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant