From a916f1cf4291da3ba4ffc55df6427497b4006f93 Mon Sep 17 00:00:00 2001 From: orbitalquark <70453897+orbitalquark@users.noreply.github.com> Date: Wed, 18 Sep 2024 13:14:18 -0400 Subject: Allow unfinished Makefile function definitions to be highlighted --- lua/lexers/makefile.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lua/lexers/makefile.lua') diff --git a/lua/lexers/makefile.lua b/lua/lexers/makefile.lua index fd90ba2..3e7ae8b 100644 --- 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))) -- cgit v1.2.3