diff options
| author | Mikhail Pogretskiy <mikhail.pogretskiy@gmail.com> | 2019-11-15 23:05:54 +0700 |
|---|---|---|
| committer | Mikhail Pogretskiy <mikhail.pogretskiy@gmail.com> | 2019-11-15 23:05:54 +0700 |
| commit | 304f10bea22b64a5910e0474900a2437ed8bf8a2 (patch) | |
| tree | 678c50f8a19640f612833241052628fb087565f5 | |
| parent | 7afced07d04eb6e4d97ee99d28e137ebf25d3002 (diff) | |
rc lua: Improve syntax highlighting
| -rw-r--r-- | rc/filetype/lua.kak | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/rc/filetype/lua.kak b/rc/filetype/lua.kak index 7e9c0657..318a20e5 100644 --- a/rc/filetype/lua.kak +++ b/rc/filetype/lua.kak @@ -45,7 +45,14 @@ add-highlighter shared/lua/double_string region '"' (?<!\\)(?:\\\\)*" fill str add-highlighter shared/lua/single_string region "'" (?<!\\)(?:\\\\)*' fill string add-highlighter shared/lua/comment region '--' $ fill comment -add-highlighter shared/lua/code/ regex \b(and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b 0:keyword +add-highlighter shared/lua/code/keyword regex \b(and|break|do|else|elseif|end|for|function|goto|if|in|not|or|repeat|return|then|until|while)\b 0:keyword +add-highlighter shared/lua/code/value regex \b(false|nil|true|[0-9]+(:?\.[0-9])?(:?[eE]-?[0-9]+)?|0x[0-9a-fA-F])\b 0:value +add-highlighter shared/lua/code/operator regex (\+|-|\*|/|%|\^|==?|~=|<=?|>=?|\.\.|#) 0:operator +add-highlighter shared/lua/code/builtin regex \b(_G|_E)\b 0:builtin +add-highlighter shared/lua/code/module regex \b(_G|_E)\b 0:module +add-highlighter shared/lua/code/attribute regex \b(local)\b 0:attribute +add-highlighter shared/lua/code/function_declaration regex \b(?:function\h+)(?:\w+\h*\.\h*)*([a-zA-Z_]\w*)\( 1:function +add-highlighter shared/lua/code/function_call regex \b([a-zA-Z_]\w*)\h*(?=[\(\{]) 1:function # Commands # ‾‾‾‾‾‾‾‾ |
