diff --git a/autoload/rainbow_main.vim b/autoload/rainbow_main.vim index 619351b..a68a3ca 100644 --- a/autoload/rainbow_main.vim +++ b/autoload/rainbow_main.vim @@ -41,6 +41,9 @@ let s:rainbow_conf = { \ 'html': { \ 'parentheses': ['start=/\v\<((script|style|area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)[ >])@!\z([-_:a-zA-Z0-9]+)(\s+[-_:a-zA-Z0-9]+(\=("[^"]*"|'."'".'[^'."'".']*'."'".'|[^ '."'".'"><=`]*))?)*\>/ end=## fold'], \ }, +\ 'lua': { +\ 'parentheses': ["start=/(/ end=/)/", "start=/{/ end=/}/", "start=/\\v\\[\\ze($|[^[])/ end=/\\]/"], +\ }, \ 'perl': { \ 'syn_name_prefix': 'perlBlockFoldRainbow', \ }, diff --git a/tests/test.lua b/tests/test.lua new file mode 100644 index 0000000..15e369d --- /dev/null +++ b/tests/test.lua @@ -0,0 +1,12 @@ +(function(args) + lst = { a=function(arg) print("hello") end, + b=(1+2)*3/4, + [3+5]={ ["hello"]=("hi") }, + } + lst[ + (function() return 0 end)()] = 1 +end)("blah") + +[[ +Special lua string... +]]