From 304f10bea22b64a5910e0474900a2437ed8bf8a2 Mon Sep 17 00:00:00 2001 From: Mikhail Pogretskiy Date: Fri, 15 Nov 2019 23:05:54 +0700 Subject: [PATCH] rc lua: Improve syntax highlighting --- rc/filetype/lua.kak | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 '"' (?=?|\.\.|#) 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 # ‾‾‾‾‾‾‾‾