mirror of
https://github.com/HiPhish/rainbow-delimiters.nvim.git
synced 2024-09-16 14:24:05 +02:00
Add Teal support
This commit is contained in:
parent
03f06991d9
commit
170994e291
3 changed files with 82 additions and 0 deletions
|
@ -18,6 +18,7 @@ Added
|
|||
- Public API function `is_enabled`
|
||||
- Rasi support
|
||||
- Svelte support
|
||||
- Teal support
|
||||
- Typst support
|
||||
- XML support
|
||||
- Missing patterns for Java:
|
||||
|
|
19
queries/teal/rainbow-delimiters.scm
Normal file
19
queries/teal/rainbow-delimiters.scm
Normal file
|
@ -0,0 +1,19 @@
|
|||
(arguments
|
||||
"(" @delimiter
|
||||
")" @delimiter @sentinel) @container
|
||||
|
||||
(table_constructor
|
||||
"{" @delimiter
|
||||
"}" @delimiter @sentinel) @container
|
||||
|
||||
(table_entry
|
||||
"[" @delimiter
|
||||
"]" @delimiter @sentinel) @container
|
||||
|
||||
(index
|
||||
"[" @delimiter
|
||||
"]" @delimiter @sentinel) @container
|
||||
|
||||
(field
|
||||
"[" @delimiter
|
||||
"]" @delimiter @sentinel) @container
|
62
test/highlight/teal/regular.tl
Normal file
62
test/highlight/teal/regular.tl
Normal file
|
@ -0,0 +1,62 @@
|
|||
-- This is a comment
|
||||
|
||||
local function add(x: integer, y: integer): integer
|
||||
if y == 0 then
|
||||
return x
|
||||
end
|
||||
return add((x + (1)), (y - (1)))
|
||||
end
|
||||
|
||||
if true then
|
||||
print 'True condition'
|
||||
elseif false then
|
||||
print 'Alternative condition'
|
||||
elseif false then
|
||||
print 'Alternative condition'
|
||||
else
|
||||
print 'Alternative'
|
||||
end
|
||||
|
||||
while false do
|
||||
print 'A while-loop'
|
||||
end
|
||||
|
||||
repeat
|
||||
print 'This will repeat only once'
|
||||
until true
|
||||
|
||||
do
|
||||
print 'A block'
|
||||
end
|
||||
|
||||
for i, v in ipairs({'a', 'b', 'c'}) do
|
||||
print(string.format("%d = %s", i, v))
|
||||
end
|
||||
|
||||
for i = 1, 5, 1 do
|
||||
print(string.format("Number %d", i))
|
||||
end
|
||||
|
||||
print(f1('a', 'b'))
|
||||
print((((('Hello, world!')))))
|
||||
|
||||
print {
|
||||
{
|
||||
{
|
||||
'Hello, world!'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
local one = {1}
|
||||
|
||||
print(one[one[one[1]]])
|
||||
|
||||
-- Embedded Vim script
|
||||
vim.cmd [[
|
||||
echo a(b(c(d(e(f())))))
|
||||
]]
|
||||
|
||||
local tbl = {
|
||||
["highlight me"] = {}
|
||||
}
|
Loading…
Reference in a new issue