fix(ninja filetype): add subninja and include declarations and fix builddir highlights

This commit is contained in:
antab 2020-09-21 13:34:27 +02:00
parent dbd7e4da79
commit d5ccdcfed4

View File

@ -53,7 +53,7 @@ add-highlighter shared/ninja/command/variables regex '\$\w+|\$\{\w+\}' 0:value
# `build`
add-highlighter shared/ninja/build region '^build ' '\n' group
add-highlighter shared/ninja/build/build regex '^build\h+' 0:keyword
add-highlighter shared/ninja/build/build regex '^build' 0:keyword
add-highlighter shared/ninja/build/rule regex ':\h+(\w+)' 0:function
add-highlighter shared/ninja/build/colonpipe regex ':|\||\|\|' 0:operator
add-highlighter shared/ninja/build/variables regex '\$\w+|\$\{\w+\}' 0:value
@ -61,13 +61,16 @@ add-highlighter shared/ninja/build/variables regex '\$\w+|\$\{\w+\}' 0:value
# variables
add-highlighter shared/ninja/variable region '^\h*\w+\h*=' '\n' group
add-highlighter shared/ninja/variable/name regex '(\w+)\h*=' 0:variable
# TODO: toplevel builddir is conflicting with build
add-highlighter shared/ninja/variable/equal regex '=' 0:operator
# `default`
add-highlighter shared/ninja/default region '^default' '\n' group
add-highlighter shared/ninja/default/default regex '^default' 0:keyword
# `subninja` and `include`
add-highlighter shared/ninja/subinc region '^subninja|include' '\n' group
add-highlighter shared/ninja/subinc/default regex '^subninja|include' 0:module
# `pool`
add-highlighter shared/ninja/pool region '^pool' '\n' group
add-highlighter shared/ninja/pool/pool regex '^pool' 0:keyword