summaryrefslogtreecommitdiff
path: root/rc/filetype
diff options
context:
space:
mode:
authorcodesoap <codesoap@mailbox.org>2019-07-30 09:55:25 +0200
committercodesoap <codesoap@mailbox.org>2019-07-30 09:55:25 +0200
commit4c3795faa2751c99c805ac0eaee1c00a2931ae24 (patch)
tree38d6424ec8d6106e6092fa8c2a5622ba5c49e5d2 /rc/filetype
parent090c0b4db12138a8f1b1237ff2fa03e0c8bb99e7 (diff)
makefile.kak: Refine regex for target
Multiple targets and the target separators ':', '::' and '!' are now supported.
Diffstat (limited to 'rc/filetype')
-rw-r--r--rc/filetype/makefile.kak4
1 files changed, 2 insertions, 2 deletions
diff --git a/rc/filetype/makefile.kak b/rc/filetype/makefile.kak
index c2e04588..fcc51ac8 100644
--- a/rc/filetype/makefile.kak
+++ b/rc/filetype/makefile.kak
@@ -33,7 +33,7 @@ add-highlighter shared/makefile/content default-region group
add-highlighter shared/makefile/comment region '#' '$' fill comment
add-highlighter shared/makefile/evaluate-commands region -recurse '\(' '\$\(' '\)' fill value
-add-highlighter shared/makefile/content/ regex ^[\w.%-/]+\h*:\s 0:variable
+add-highlighter shared/makefile/content/ regex ^\S.*?(::|:|!) 0:variable
add-highlighter shared/makefile/content/ regex [+?:]= 0:operator
evaluate-commands %sh{
@@ -55,7 +55,7 @@ define-command -hidden makefile-indent-on-new-line %{
# preserve previous line indent
try %{ execute-keys -draft \;K<a-&> }
## If the line above is a target indent with a tab
- try %{ execute-keys -draft Z k<a-x> <a-k>^[^:]+:\s<ret> z i<tab> }
+ try %{ execute-keys -draft Z k<a-x> <a-k>^[^\t].*?(::|:|!)<ret> z i<tab> }
# cleanup trailing white space son previous line
try %{ execute-keys -draft k<a-x> s \h+$ <ret>d }
# indent after some keywords