This repository was archived by the owner on Jun 3, 2022. It is now read-only.
This repository was archived by the owner on Jun 3, 2022. It is now read-only.
Lua parser fails to find ending of string enclosed by level 1 long brackets if the last character of the string is a square bracket #7
Open
Description
Describe the bug
Lua parser fails to find ending of string enclosed by level 1 Lua long brackets if the last character of the string is a square bracket.
To Reproduce
- Open https://raw.githubusercontent.com/neovim/neovim/725cbe7d414f609e769081276f2a034e32a4337b/test/functional/terminal/tui_spec.lua using Nvim with nvim-treesitter Lua parser for highlight.
- All of lines 35 to 874 are highlighted as string.
Expected behavior
Lines 35 to 874 are highlighted correctly.
Output of :checkhealth nvim-treesitter
nvim-treesitter: require("nvim-treesitter.health").check()
========================================================================
## Installation
- OK: `tree-sitter` found 0.20.0 (parser generator, only needed for :TSInstallFromGrammar)
- OK: `node` found v16.11.1 (only needed for :TSInstallFromGrammar)
- OK: `git` executable found.
- OK: `cc` executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" }
Version: cc (GCC) 11.1.0
- OK: Neovim was compiled with tree-sitter runtime ABI version 13 (required >=13). Parsers must be compatible with runtime ABI.
## Parser/Features H L F I J
- python ✓ ✓ ✓ ✓ ✓
- lua ✓ ✓ ✓ ✓ ✓
- cpp ✓ ✓ ✓ ✓ ✓
- c ✓ ✓ ✓ ✓ ✓
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}
Output of nvim --version
NVIM v0.6.0-dev+604-g725cbe7d41
Build type: RelWithDebInfo
LuaJIT 2.0.5
Compilation: /usr/bin/cc -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/build/neovim-git/src/build/config -I/build/neovim-git/src/neovim-git/src -I/usr/include -I/build/neovim-git/src/build/src/nvim/auto -I/build/neovim-git/src/build/include
Compiled by builduser
Features: +acl +iconv +tui
See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/share/nvim"
Run :checkhealth for more info
Additional context
Metadata
Metadata
Assignees
Labels
No labels