Describe the bug
If I put the not closed bracket in string then indentation goes on the level of that bracket
To Reproduce
- Create string variable containing open bracket (like in screenshoot)
- From here any new line will be auto intent at "{" level
Expected behavior
Do not indent based on string content
Output of :checkhealth nvim-treesitter
nvim-treesitter: ✅
Requirements ~
- ✅ OK Neovim was compiled with tree-sitter runtime ABI version 15 (required >=13).
- ✅ OK tree-sitter-cli 0.25.10 (/usr/bin/tree-sitter)
- ✅ OK tar 1.35.0 (/usr/bin/tar)
- ✅ OK curl 8.17.0 (/usr/bin/curl)
curl 8.17.0 (x86_64-pc-linux-gnu) libcurl/8.17.0 OpenSSL/3.6.0 zlib/1.3.1 brotli/1.1.0 zstd/1.5.7 libidn2/2.3.8 libpsl/0.21.5 libssh2/1.11.1 nghttp2/1.68.0 nghttp3/1.13.1 mit-krb5/1.21.3
Release-Date: 2025-11-05
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp ws wss
Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTP3 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM PSL SPNEGO SSL threadsafe TLS-SRP UnixSockets zstd
OS Info ~
- sysname: Linux
- machine: x86_64
- release: 6.13.0-4-rt5-MANJARO
- version: #1 SMP PREEMPT_RT Mon May 5 20:48:44 UTC 2025
Install directory for parsers and queries ~
- /home/mironov_a/.local/share/nvim/site/
- ✅ OK is writable.
- ✅ OK is in runtimepath.
Installed languages H L F I J ~
- astro ✓ ✓ ✓ ✓ ✓
- bash ✓ ✓ ✓ ✓ ✓
- c ✓ ✓ ✓ ✓ ✓
- css ✓ . ✓ ✓ ✓
- diff ✓ . ✓ . ✓
- ecma
- editorconfig ✓ . ✓ . ✓
- gitcommit ✓ . . . ✓
- go ✓ ✓ ✓ ✓ ✓
- gomod ✓ . . . ✓
- gosum ✓ . . . .
- gowork ✓ . . . ✓
- graphql ✓ . . ✓ ✓
- html ✓ ✓ ✓ ✓ ✓
- html_tags
- javascript ✓ ✓ ✓ ✓ ✓
- jsdoc ✓ . . . .
- json ✓ ✓ ✓ ✓ ✓
- json5 ✓ . . . ✓
- jsx
- lua ✓ ✓ ✓ ✓ ✓
- luadoc ✓ . . . .
- luap ✓ . . . .
- markdown ✓ . ✓ ✓ ✓
- markdown_inline ✓ . . . ✓
- python ✓ ✓ ✓ ✓ ✓
- query ✓ ✓ ✓ ✓ ✓
- regex ✓ . . . .
- ruby ✓ ✓ ✓ ✓ ✓
- toml ✓ ✓ ✓ ✓ ✓
- tsx ✓ ✓ ✓ ✓ ✓
- typescript ✓ ✓ ✓ ✓ ✓
- vim ✓ ✓ ✓ . ✓
- vimdoc ✓ . . . ✓
- yaml ✓ ✓ ✓ ✓ ✓
- zsh ✓ ✓ ✓ . ✓
Legend: H[ighlights], L[ocals], F[olds], I[ndents], In[J]ections ~
Output of nvim --version
nvim --version
NVIM v0.12.0-dev-2027+g025c0c34ce
Build type: RelWithDebInfo
LuaJIT 2.1.1767980792
Run "nvim -V1 -v" for more info
Additional context
No response
Describe the bug
If I put the not closed bracket in string then indentation goes on the level of that bracket
To Reproduce
Expected behavior
Do not indent based on string content
Output of
:checkhealth nvim-treesitterOutput of
nvim --versionAdditional context
No response