Skip to content

fix(treesitter): Add indentation fallback#1988

Merged
oriori1703 merged 1 commit intonvim-lua:masterfrom
sebastianstudniczek:fix/treesitter-indent-fallback
Apr 12, 2026
Merged

fix(treesitter): Add indentation fallback#1988
oriori1703 merged 1 commit intonvim-lua:masterfrom
sebastianstudniczek:fix/treesitter-indent-fallback

Conversation

@sebastianstudniczek
Copy link
Copy Markdown
Contributor

@sebastianstudniczek sebastianstudniczek commented Apr 10, 2026

Add fallback for languages which does not have indent query available, therefore neovim will use the built in indentation functions.

For example C# currently does not have treesitter indent query available

Installed languages     H L F I J ~
- bash                  ✓ ✓ ✓ ✓ ✓
- c                     ✓ ✓ ✓ ✓ ✓
- c_sharp               ✓ ✓ ✓ . ✓
- diff                  ✓ . ✓ . ✓
- dtd                   ✓ ✓ ✓ . ✓

Output from checking indentexpr for C# file after change

20:13:49 msg_show.list_cmd   set indentexpr?   indentexpr=GetCSIndent(v:lnum)

@sebastianstudniczek sebastianstudniczek changed the title Add indentation fallback fix(treesitter): Add indentation fallback Apr 10, 2026
@oriori1703
Copy link
Copy Markdown
Collaborator

LGTM :)

@oriori1703 oriori1703 merged commit c0cc054 into nvim-lua:master Apr 12, 2026
1 check passed
dam9000 added a commit to dam9000/kickstart-modular.nvim that referenced this pull request Apr 12, 2026
AIMacGyver added a commit to AIMacGyver/kickstart.nvim that referenced this pull request Apr 13, 2026
- Keep local treesitter parser list (go, python, ts, sql, docker, etc.)
- Take upstream's has_indent_query guard (PR nvim-lua#1988 bug fix)
- Keep local lint.lua (markdownlint-cli2 + golangcilint)
- Auto-merged: neo-tree filtered_items removal, gitsigns comment update,
  treesitter auto-install on file open

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants