From 2c2eccce597901a6f548f963de8f79231e728de2 Mon Sep 17 00:00:00 2001 From: Anthony Naddeo Date: Thu, 21 Dec 2023 12:27:33 -0800 Subject: [PATCH] Add syntax example before I can get the repo setup. --- README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/README.md b/README.md index bf54823..7ac08ac 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,37 @@ curl https://raw.githubusercontent.com/naddeoa/booty/master/scripts/booty-downlo curl https://raw.githubusercontent.com/naddeoa/booty/master/scripts/booty-download-mac-universal.sh | bash ``` +## Syntax + +A simple syntax definition is available for vim/nvim. This can be placed in `~/.config/nvim/syntax/booty.vim`, for example. This will be +updated with a dedicated repo soon. + +```syntax +syntax clear + +syntax region bootyArgs start=/(/ end=/)/ contains=@Spell +syntax region bootyParams start=/$((/ end=/))/ contains=@Spell +syntax match bootyTargetName "\v^\zs[^ \t:]+\ze:.*" +syntax match bootyTargetDependenciesName "\v^\zs[^ \t]+\ze\s+(-\>|\<-).*" +syntax match bootyImplementsName "\v^\s+\zs[^ \t:]+\ze:.*" +syntax keyword bootyKeyword recipe setup is_setup +syntax match bootyOpDependsOn "->" +syntax match bootyOpDependedUpon "<-" +syntax match bootyComment "^#.*$" + +highlight link bootyComment Comment +highlight link bootyKeyword Keyword +highlight link bootyOpDependsOn Operator +highlight link bootyOpDependedUpon Operator +highlight link bootyTargetName Function +highlight link bootyTargetDependenciesName Function +highlight link bootyImplementsName Function +highlight link bootyRecipeCall Funciton +highlight link bootyArgs String +highlight link bootyParams Type + +``` + # Booty Language