diff --git a/syntax/just.vim b/syntax/just.vim index 5ed3d3a..3a5163b 100644 --- a/syntax/just.vim +++ b/syntax/just.vim @@ -20,7 +20,7 @@ syn match justName "\h[a-zA-Z0-9_-]*" contained syn match justFunction "\h[a-zA-Z0-9_-]*" contained syn match justPreBodyComment "\v%(\s|\\\n)*#%([^!].*)?\n%(\t+| +)@=" transparent contained contains=justComment - \ nextgroup=@justBodies skipnl + \ nextgroup=@justBodies skipnl syn match justPreBodyCommentError "\v^%(%(\\\n)@3%(%(\s|\\\n)*\=)@!" contained syn region justRecipeParenDefault - \ matchgroup=justRecipeDepParamsParen start='\v%(\=%(\s|\\\n)*)@<=\(' end='\V)' - \ contained - \ contains=@justExpr,justParenInner + \ matchgroup=justRecipeDepParamsParen start='\v%(\=%(\s|\\\n)*)@<=\(' end='\V)' + \ contained + \ contains=@justExpr,justParenInner syn match justRecipeSubsequentDeps '&&' contained syn match justRecipeNoDeps '\v:%(\s|\\\n)*\n|:#@=|:%(\s|\\\n)+#@=' - \ transparent contained - \ contains=justRecipeColon - \ nextgroup=justPreBodyComment,justPreBodyCommentError,@justBodies + \ transparent contained + \ contains=justRecipeColon + \ nextgroup=justPreBodyComment,justPreBodyCommentError,@justBodies syn region justRecipeDeps start="\v:%(\s|\\\n)*%([a-zA-Z_(]|\&\&)" skip='\\\n' end="\v#@=|\\@1.*)@<=\{\{\{@!" end="\v%(%(\\\n\z1|\S)\s*)@<=\}\}|$" - \ contained - \ contains=justName,@justExprBase,@justBuiltInFunctionsInInterp + \ matchgroup=justInterpolationDelim + \ start="\v%(^\z(\s+)@>.*)@<=\{\{\{@!" end="\v%(%(\\\n\z1|\S)\s*)@<=\}\}|$" + \ contained + \ contains=justName,@justExprBase,@justBuiltInFunctionsInInterp syn match justBadCurlyBraces '\v\{{3}\ze[^{]' contained syn match justCurlyBraces '\v\{{4}' contained @@ -184,54 +184,54 @@ syn match justBadCurlyBraces '\v\{{5}\ze[^{]' contained syn cluster justOtherCurlyBraces contains=justCurlyBraces,justBadCurlyBraces syn region justBuiltInFunction - \ transparent end=')' - \ matchgroup=justFunction start="\v%(a%(bsolute_pat|rc)h|c%(apitalize|lean)|e%(nv%(_var%(_or_default)?)?|xtension)|file_%(name|stem)|j%(oin|ust%(_executable|file%(_directory)?))|kebabcase|lowerca%(melca)?se|pa%(rent_directory|th_exists)|quote|replace|s%(emver_matches|h%(a256%(_file)?|outy%(kebab|snake)case)|nakecase)|t%(itlecase|rim%(_%(end|start)%(_match%(es)?)?)?)|u%(pperca%(melca)?se|uid)|without_extension|invocation_directory%(_native)?|num_cpus|os%(_family)?)%(%(\s|\\\n)*\()@=" - \ matchgroup=justUserDefinedError start="\verror%(%(\s|\\\n)*\()@=" - \ matchgroup=justBuiltInFunctionsError start="\v\h[a-zA-Z0-9_-]*%(\s|\\\n)*\(" - \ contains=justNoise,@justExpr + \ transparent end=')' + \ matchgroup=justFunction start="\v%(a%(bsolute_pat|rc)h|c%(apitalize|lean)|e%(nv%(_var%(_or_default)?)?|xtension)|file_%(name|stem)|j%(oin|ust%(_executable|file%(_directory)?))|kebabcase|lowerca%(melca)?se|pa%(rent_directory|th_exists)|quote|replace|s%(emver_matches|h%(a256%(_file)?|outy%(kebab|snake)case)|nakecase)|t%(itlecase|rim%(_%(end|start)%(_match%(es)?)?)?)|u%(pperca%(melca)?se|uid)|without_extension|invocation_directory%(_native)?|num_cpus|os%(_family)?)%(%(\s|\\\n)*\()@=" + \ matchgroup=justUserDefinedError start="\verror%(%(\s|\\\n)*\()@=" + \ matchgroup=justBuiltInFunctionsError start="\v\h[a-zA-Z0-9_-]*%(\s|\\\n)*\(" + \ contains=justNoise,@justExpr syn region justBuiltInFuncParamValue - \ transparent end=')' - \ matchgroup=justFunction start="\v%(a%(bsolute_pat|rc)h|c%(apitalize|lean)|e%(nv%(_var%(_or_default)?)?|xtension)|file_%(name|stem)|j%(oin|ust%(_executable|file%(_directory)?))|kebabcase|lowerca%(melca)?se|pa%(rent_directory|th_exists)|quote|replace|s%(emver_matches|h%(a256%(_file)?|outy%(kebab|snake)case)|nakecase)|t%(itlecase|rim%(_%(end|start)%(_match%(es)?)?)?)|u%(pperca%(melca)?se|uid)|without_extension|invocation_directory%(_native)?|num_cpus|os%(_family)?)%(%(\s|\\\n)*\()@=" - \ matchgroup=justUserDefinedError start="\verror%(%(\s|\\\n)*\()@=" - \ matchgroup=justBuiltInFunctionsError start="\v\h[a-zA-Z0-9_-]*%(\s|\\\n)*\(" - \ contained - \ contains=justNoise,@justExpr - \ nextgroup=justParameterError,justParameterLineContinuation + \ transparent end=')' + \ matchgroup=justFunction start="\v%(a%(bsolute_pat|rc)h|c%(apitalize|lean)|e%(nv%(_var%(_or_default)?)?|xtension)|file_%(name|stem)|j%(oin|ust%(_executable|file%(_directory)?))|kebabcase|lowerca%(melca)?se|pa%(rent_directory|th_exists)|quote|replace|s%(emver_matches|h%(a256%(_file)?|outy%(kebab|snake)case)|nakecase)|t%(itlecase|rim%(_%(end|start)%(_match%(es)?)?)?)|u%(pperca%(melca)?se|uid)|without_extension|invocation_directory%(_native)?|num_cpus|os%(_family)?)%(%(\s|\\\n)*\()@=" + \ matchgroup=justUserDefinedError start="\verror%(%(\s|\\\n)*\()@=" + \ matchgroup=justBuiltInFunctionsError start="\v\h[a-zA-Z0-9_-]*%(\s|\\\n)*\(" + \ contained + \ contains=justNoise,@justExpr + \ nextgroup=justParameterError,justParameterLineContinuation syn region justBuiltInFuncInInterp - \ transparent end=')' - \ matchgroup=justFunction start="\v%(a%(bsolute_pat|rc)h|c%(apitalize|lean)|e%(nv%(_var%(_or_default)?)?|xtension)|file_%(name|stem)|j%(oin|ust%(_executable|file%(_directory)?))|kebabcase|lowerca%(melca)?se|pa%(rent_directory|th_exists)|quote|replace|s%(emver_matches|h%(a256%(_file)?|outy%(kebab|snake)case)|nakecase)|t%(itlecase|rim%(_%(end|start)%(_match%(es)?)?)?)|u%(pperca%(melca)?se|uid)|without_extension|invocation_directory%(_native)?|num_cpus|os%(_family)?)%(%(\s|\\\n)*\()@=" - \ matchgroup=justUserDefinedError start="\verror%(%(\s|\\\n)*\()@=" - \ matchgroup=justBuiltInFunctionsError start="\v\h[a-zA-Z0-9_-]*%(\s|\\\n)*\(" - \ contained - \ contains=justNoise,@justExprBase,@justBuiltInFunctionsInInterp,justName + \ transparent end=')' + \ matchgroup=justFunction start="\v%(a%(bsolute_pat|rc)h|c%(apitalize|lean)|e%(nv%(_var%(_or_default)?)?|xtension)|file_%(name|stem)|j%(oin|ust%(_executable|file%(_directory)?))|kebabcase|lowerca%(melca)?se|pa%(rent_directory|th_exists)|quote|replace|s%(emver_matches|h%(a256%(_file)?|outy%(kebab|snake)case)|nakecase)|t%(itlecase|rim%(_%(end|start)%(_match%(es)?)?)?)|u%(pperca%(melca)?se|uid)|without_extension|invocation_directory%(_native)?|num_cpus|os%(_family)?)%(%(\s|\\\n)*\()@=" + \ matchgroup=justUserDefinedError start="\verror%(%(\s|\\\n)*\()@=" + \ matchgroup=justBuiltInFunctionsError start="\v\h[a-zA-Z0-9_-]*%(\s|\\\n)*\(" + \ contained + \ contains=justNoise,@justExprBase,@justBuiltInFunctionsInInterp,justName syn region justReplaceRegex - \ transparent end=')' - \ matchgroup=justFunction start='\vreplace_regex%(%(\s|\\\n)*\()@=' - \ contains=justNoise,@justExpr,justRegexReplacement + \ transparent end=')' + \ matchgroup=justFunction start='\vreplace_regex%(%(\s|\\\n)*\()@=' + \ contains=justNoise,@justExpr,justRegexReplacement syn region justReplaceRegexParamValue - \ transparent end=')' - \ matchgroup=justFunction start='\vreplace_regex%(%(\s|\\\n)*\()@=' - \ contained - \ contains=justNoise,@justExpr,justRegexReplacement - \ nextgroup=justParameterError,justParameterLineContinuation + \ transparent end=')' + \ matchgroup=justFunction start='\vreplace_regex%(%(\s|\\\n)*\()@=' + \ contained + \ contains=justNoise,@justExpr,justRegexReplacement + \ nextgroup=justParameterError,justParameterLineContinuation syn region justReplaceRegexInInterp - \ transparent end=')' - \ matchgroup=justFunction start='\vreplace_regex%(%(\s|\\\n)*\()@=' - \ contained - \ contains=justNoise,@justExprBase,justRegexReplacement,@justBuiltInFunctionsInInterp,justName + \ transparent end=')' + \ matchgroup=justFunction start='\vreplace_regex%(%(\s|\\\n)*\()@=' + \ contained + \ contains=justNoise,@justExprBase,justRegexReplacement,@justBuiltInFunctionsInInterp,justName syn match justBuiltInFunctionsError "\v%(arch|invocation_directory%(_native)?|just%(_executable|file%(_directory)?)|num_cpus|os%(_family)?|uuid)%(\s|\\\n)*\(%(\_s|\\\n)*%(%([^)[:space:]\\]|\\\n@!)%(\_s|\\\n)*)+\)" syn match justBuiltInFuncErrorParamValue "\v%(arch|invocation_directory%(_native)?|just%(_executable|file%(_directory)?)|num_cpus|os%(_family)?|uuid)%(\s|\\\n)*\(%(\_s|\\\n)*%(%([^)[:space:]\\]|\\\n@!)%(\_s|\\\n)*)+\)" - \ contained nextgroup=justParameterError,justParameterLineContinuation + \ contained nextgroup=justParameterError,justParameterLineContinuation syn match justParameterLineContinuation '\v%(\s|\\\n)*' contained nextgroup=justParameterError syn match justRecipeDepParenName '\v%(\(%(\s|\\\n)*)@<=\h[a-zA-Z0-9_-]*' - \ transparent contained - \ contains=justFunction + \ transparent contained + \ contains=justFunction syn cluster justBuiltInFunctions contains=justBuiltInFunction,justReplaceRegex,justBuiltInFunctionsError syn cluster justBuiltInFunctionsParamValue contains=justBuiltInFuncParamValue,justReplaceRegexParamValue,justBuiltInFuncErrorParamValue