We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
if
nvim-treesitter incorrectly indents the body of if statements (and also else, for, while, etc.) if it is not wrapped in curly braces.
else
for
while
function foo() { if (true) return 0; }
return
==
Code stays unchanged.
:checkhealth nvim-treesitter
============================================================================== nvim-treesitter: require("nvim-treesitter.health").check() Installation ~ - WARNING `tree-sitter` executable not found (parser generator, only needed for :TSInstallFromGrammar, not required for :TSInstall) - OK `node` found v21.5.0 (only needed for :TSInstallFromGrammar) - OK `git` executable found. - OK `cc` executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" } Version: cc (GCC) 13.2.1 20230801 - OK Neovim was compiled with tree-sitter runtime ABI version 14 (required >=13). Parsers must be compatible with runtime ABI. OS Info: { machine = "x86_64", release = "6.6.11-1-lts", sysname = "Linux", version = "#1 SMP PREEMPT_DYNAMIC Wed, 10 Jan 2024 16:41:56 +0000" } ~ Parser/Features H L F I J - bash ✓ ✓ ✓ . ✓ - c ✓ ✓ ✓ ✓ ✓ - cpp ✓ ✓ ✓ ✓ ✓ - go ✓ ✓ ✓ ✓ ✓ - javascript ✓ ✓ ✓ ✓ ✓ - lua ✓ ✓ ✓ ✓ ✓ - markdown ✓ . ✓ ✓ ✓ - markdown_inline ✓ . . . ✓ - python ✓ ✓ ✓ ✓ ✓ - query ✓ ✓ ✓ ✓ ✓ - rust ✓ ✓ ✓ ✓ ✓ - tsx ✓ ✓ ✓ ✓ ✓ - typescript ✓ ✓ ✓ ✓ ✓ - vim ✓ ✓ ✓ . ✓ - vimdoc ✓ . . . ✓ Legend: H[ighlight], L[ocals], F[olds], I[ndents], In[j]ections +) multiple parsers found, only one will be used x) errors found in the query, try to run :TSUpdate {lang} ~
nvim --version
NVIM v0.10.0-dev-2086+g965dbd0e0 Build type: RelWithDebInfo LuaJIT 2.1.1703358377 Run "nvim -V1 -v" for more info
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
nvim-treesitter incorrectly indents the body of
if
statements (and alsoelse
,for
,while
, etc.) if it is not wrapped in curly braces.To Reproduce
return
) with==
. Code becomesExpected behavior
Code stays unchanged.
Output of
:checkhealth nvim-treesitter
Output of
nvim --version
Additional context
No response
The text was updated successfully, but these errors were encountered: