diff --git a/rc/base/makefile.kak b/rc/core/makefile.kak similarity index 86% rename from rc/base/makefile.kak rename to rc/core/makefile.kak index a4c71ddd..08fbdfd0 100644 --- a/rc/base/makefile.kak +++ b/rc/core/makefile.kak @@ -19,12 +19,12 @@ addhl -group / regions -default content makefile \ addhl -group /makefile/comment fill comment addhl -group /makefile/eval fill value -addhl -group /makefile/content regex ^[\w.%]+\h*:\s 0:identifier +addhl -group /makefile/content regex ^[\w.%-]+\h*:\s 0:identifier addhl -group /makefile/content regex [+?:]= 0:operator %sh{ # Grammar - keywords="ifeq|ifneq|else|endif" + keywords="ifeq|ifneq|ifdef|ifndef|else|endif|define|endef" # Add the language's grammar to the static completion list printf %s\\n "hook global WinSetOption filetype=makefile %{ @@ -46,8 +46,8 @@ def -hidden _makefile-indent-on-new-line %{ try %{ exec -draft Z k ^[^:]+:\s z i } # cleanup trailing white space son previous line try %{ exec -draft k s \h+$ d } - # indent after ifeq, ifneq, else - try %{ exec -draft Z k ^\h*(ifeq|ifneq|else)\b z } + # indent after some keywords + try %{ exec -draft Z k ^\h*(ifeq|ifneq|ifdef|ifndef|else|define)\b z } } }