vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit 4fa8fbcf2d1fa4e693134e4c9f5741f5181fc80a parent c3adbf233e1237cc8330a4e2379d593ad32c9ff6 Author: orbitalquark <70453897+orbitalquark@users.noreply.github.com> Date: Wed, 18 Sep 2024 13:14:18 -0400 Allow unfinished Makefile function definitions to be highlighted Diffstat:
| M | lua/lexers/makefile.lua | | | 4 | ++-- |
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lua/lexers/makefile.lua b/lua/lexers/makefile.lua @@ -11,8 +11,8 @@ local word = (lexer.any - lexer.space - S('$:,#=(){}'))^1 local func_name = lex:tag(lexer.FUNCTION, word) local ws = lex:get_rule('whitespace') local eq = lex:tag(lexer.OPERATOR, '=') -lex:add_rule('function_def', - lex:tag(lexer.KEYWORD, lexer.word_match('define')) * ws * func_name * ws^-1 * eq) +lex:add_rule('function_def', lex:tag(lexer.KEYWORD, lexer.word_match('define')) * ws * func_name * + ws^-1 * (eq + -1)) -- Keywords. lex:add_rule('keyword', lex:tag(lexer.KEYWORD, P('!')^-1 * lex:word_match(lexer.KEYWORD, true)))