nvim-treesitter/tests/query/highlights/lua/test.lua
TheLeoP bbb92b2b8e
fix(lua): luap injection (#5275)
* fix(lua): luap injection

* test(lua): check for incorrect hlgroup of injected luap

* chore(lua): injections styling

* chore(lua): ignore luacheck for test.lua
2023-08-18 02:17:04 +00:00

18 lines
363 B
Lua

-- luacheck: ignore
local a = { 1, 2, 3, 4, 5 }
-- ^ number ^ punctuation.bracket
-- ^ variable
local _ = next(a)
-- ^ function.builtin
-- ^ keyword
_ = next(a)
-- ^ function.builtin
next(a)
-- ^ function.builtin
-- Checking for incorrect hlgroup of injected luap
string.match(s, "\0%d[^\n]+")
-- ^ !constant