Skip to content

Commit

Permalink
Add set dotenv-required
Browse files Browse the repository at this point in the history
  • Loading branch information
laniakea64 committed Jun 5, 2024
1 parent 4ffcf9e commit 152d4f6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ just_boolean_settings := """
allow-duplicate-recipes
allow-duplicate-variables
dotenv-load
dotenv-required
export
fallback
ignore-comments
Expand Down
4 changes: 2 additions & 2 deletions syntax/just.vim
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,10 @@ syn match justAssignment "\v^\h\k*%(\s|\\\n)*:\=" transparent contains=justAssig

syn match justSet '\v^set' contained
syn keyword justSetKeywords
\ allow-duplicate-recipes allow-duplicate-variables dotenv-load dotenv-filename dotenv-path export fallback ignore-comments positional-arguments quiet shell tempdir windows-shell
\ allow-duplicate-recipes allow-duplicate-variables dotenv-load dotenv-filename dotenv-path dotenv-required export fallback ignore-comments positional-arguments quiet shell tempdir windows-shell
\ contained
syn keyword justSetDeprecatedKeywords windows-powershell contained
syn match justBooleanSet "\v^set%(\s|\\\n)+%(allow-duplicate-%(recip|variabl)es|dotenv-load|export|fallback|ignore-comments|positional-arguments|quiet|windows-powershell)%(%(\s|\\\n)*:\=%(\s|\\\n)*%(true|false))?$"
syn match justBooleanSet "\v^set%(\s|\\\n)+%(allow-duplicate-%(recip|variabl)es|dotenv-%(loa|require)d|export|fallback|ignore-comments|positional-arguments|quiet|windows-powershell)%(%(\s|\\\n)*:\=%(\s|\\\n)*%(true|false))?$"
\ contains=justSet,justSetKeywords,justSetDeprecatedKeywords,justAssignmentOperator,justBoolean
\ transparent

Expand Down
4 changes: 4 additions & 0 deletions tests/cases/set.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,7 @@

<span class="Statement">set</span> <span class="Keyword">dotenv-filename</span> <span class="Operator">:=</span> <span class="String">"mydotenv"</span>
<span class="Statement">set</span> <span class="Keyword">dotenv-path</span> <span class="Operator">:=</span> <span class="String">'/tmp/dotenv'</span>

<span class="Statement">set</span> <span class="Keyword">dotenv-required</span>
<span class="Statement">set</span> <span class="Keyword">dotenv-required</span> <span class="Operator">:=</span> <span class="Boolean">true</span>
<span class="Statement">set</span> <span class="Keyword">dotenv-required</span> <span class="Operator">:=</span> <span class="Boolean">false</span>
4 changes: 4 additions & 0 deletions tests/cases/set.just
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,7 @@ set tempdir := x'${XDG_CACHE_HOME:-/tmp}'

set dotenv-filename := "mydotenv"
set dotenv-path := '/tmp/dotenv'

set dotenv-required
set dotenv-required := true
set dotenv-required := false

0 comments on commit 152d4f6

Please sign in to comment.