Skip to content

Commit

Permalink
Add syntax example before I can get the repo setup.
Browse files Browse the repository at this point in the history
  • Loading branch information
naddeoa committed Dec 21, 2023
1 parent 507659f commit 2c2eccc
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 2c2eccc

Please sign in to comment.