Skip to content

Instantly share code, notes, and snippets.

@anthonygclark
Last active December 21, 2015 00:08
Show Gist options
  • Save anthonygclark/6217558 to your computer and use it in GitHub Desktop.
Save anthonygclark/6217558 to your computer and use it in GitHub Desktop.
Better (and possibly broken) lua highlighting for vim. Goes in ~/.vim/after/syntax/
syntax match luaMinus /-\@<!--\@!/
syntax match simpleOperator "[.!~:*&%<>^|=,+]"
syntax match simpleOperator "/[^/*=]"me=e-1
syntax match simpleOperator "/$"
syntax match simpleOperator "&&\|||"
syntax match simpleOperator "[][]"
syntax match parenDelimiter "[();\\]"
syntax match luaCustomParen "(" contains=parenDelimiter
syntax match luaCustomFunc "\w\+\s*(" contains=luaCustomParen
highlight link potionOperator Operator
highlight link simpleOperator Operator
highlight link luaMinus Operator
highlight link parenDelimiter Delimiter
highlight link luaFunction Type
highlight link luaCustomFunc Function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment