Skip to content

Commit

Permalink
Add new settings
Browse files Browse the repository at this point in the history
  • Loading branch information
laniakea64 committed Jul 31, 2024
1 parent 3143de2 commit b1c8c34
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions syntax/just.vim
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ 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 dotenv-required export fallback ignore-comments positional-arguments quiet shell tempdir unstable windows-shell
\ allow-duplicate-recipes allow-duplicate-variables dotenv-load dotenv-filename dotenv-path dotenv-required export fallback ignore-comments positional-arguments quiet script-interpreter shell tempdir unstable windows-shell working-directory
\ contained
syn keyword justSetDeprecatedKeywords windows-powershell contained
syn match justBooleanSet "\v^set%(\s|\\\n)+%(allow-duplicate-%(recip|variabl)es|dotenv-%(loa|require)d|export|fallback|ignore-comments|positional-arguments|quiet|unstable|windows-powershell)%(%(\s|\\\n)*:\=%(\s|\\\n)*%(true|false))?$"
Expand All @@ -170,7 +170,7 @@ syn match justBooleanSet "\v^set%(\s|\\\n)+%(allow-duplicate-%(recip|variabl)es|
syn match justStringSet '\v^set%(\s|\\\n)+\k+%(\s|\\\n)*:\=%(\s|\\\n)*%(x?['"])@=' transparent contains=justSet,justSetKeywords,justAssignmentOperator

syn match justShellSet
\ "\v^set%(\s|\\\n)+%(windows-)?shell%(\s|\\\n)*:\=%(\s|\\\n)*\[@="
\ "\v^set%(\s|\\\n)+%(s%(hell|cript-interpreter)|windows-shell)%(\s|\\\n)*:\=%(\s|\\\n)*\[@="
\ contains=justSet,justSetKeywords,justAssignmentOperator
\ transparent skipwhite
\ nextgroup=justShellSetValue
Expand Down
4 changes: 4 additions & 0 deletions tests/cases/set.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@

<span class="Statement">set</span> <span class="Keyword">windows-shell</span><span class="Operator">:=</span>[<span class="String">"powershell.exe"</span>, <span class="String">"-NoLogo"</span>, <span class="String">"-Command"</span>]

<span class="Statement">set</span> <span class="Keyword">script-interpreter</span> <span class="Operator">:=</span> [<span class="String">'/usr/bin/env'</span>, <span class="String">'python3'</span>]

<span class="Statement">set</span> <span class="Keyword">fallback</span>
<span class="Statement">set</span> <span class="Keyword">fallback</span> <span class="Operator">:=</span> <span class="Boolean">true</span>
<span class="Statement">set</span> <span class="Keyword">fallback</span> <span class="Operator">:=</span> <span class="Boolean">false</span>
Expand All @@ -59,3 +61,5 @@
<span class="Statement">set</span> <span class="Keyword">unstable</span>
<span class="Statement">set</span> <span class="Keyword">unstable</span> <span class="Operator">:=</span> <span class="Boolean">true</span>
<span class="Statement">set</span> <span class="Keyword">unstable</span> <span class="Operator">:=</span> <span class="Boolean">false</span>

<span class="Statement">set</span> <span class="Keyword">working-directory</span> <span class="Operator">:=</span> <span class="String">'/tmp'</span>
4 changes: 4 additions & 0 deletions tests/cases/set.just
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ set shell := [x"$SHELL"]

set windows-shell:=["powershell.exe", "-NoLogo", "-Command"]

set script-interpreter := ['/usr/bin/env', 'python3']

set fallback
set fallback := true
set fallback := false
Expand All @@ -59,3 +61,5 @@ set dotenv-required := false
set unstable
set unstable := true
set unstable := false

set working-directory := '/tmp'

0 comments on commit b1c8c34

Please sign in to comment.