| 1 |
# For more information, see https://github.com/casey/just |
| 2 |
filetype: 'justfile' |
| 3 |
|
| 4 |
detect: |
| 5 |
filename: "(^\\.?[Jj]ustfile|\\.just)$" |
| 6 |
header: "^#!.*/(env +)?[bg]?just --justfile" |
| 7 |
|
| 8 |
rules: |
| 9 |
- preproc: "\\<(ifeq|ifdef|ifneq|ifndef|else|endif)\\>" |
| 10 |
- statement: "^(export|include|override)\\>" |
| 11 |
- symbol.operator: "^[^:= ]+:" |
| 12 |
- symbol.operator: "([=,%]|\\+=|\\?=|:=|&&|\\|\\|)" |
| 13 |
- statement: "\\$\\((abspath|addprefix|addsuffix|and|basename|call|dir)[[:space:]]" |
| 14 |
- statement: "\\$\\((error|eval|filter|filter-out|findstring|firstword)[[:space:]]" |
| 15 |
- statement: "\\$\\((flavor|foreach|if|info|join|lastword|notdir|or)[[:space:]]" |
| 16 |
- statement: "\\$\\((origin|patsubst|realpath|shell|sort|strip|suffix)[[:space:]]" |
| 17 |
- statement: "\\$\\((value|warning|wildcard|word|wordlist|words)[[:space:]]" |
| 18 |
# default functions - probably shouldn't be overwritten by assignment |
| 19 |
- statement: "\\b(arch|os|os_family|env_var|invocation_directory|justfile|justfile_directory|just_executable|lowercase|quote|replace|trim|trim_end|trim_end|trim_end_match|trim_end_matches|trim_start|trim_start_match|trim_start_matches|uppercase)\\b" |
| 20 |
- identifier: "^.+:" |
| 21 |
- identifier: "[()$]" |
| 22 |
- constant.string: |
| 23 |
start: "\"" |
| 24 |
end: "\"" |
| 25 |
skip: "\\\\." |
| 26 |
rules: |
| 27 |
- constant.specialChar: "\\\\." |
| 28 |
- constant.string: |
| 29 |
start: "'" |
| 30 |
end: "'" |
| 31 |
skip: "\\\\." |
| 32 |
rules: |
| 33 |
- constant.specialChar: "\\\\." |
| 34 |
- identifier: "\\$+(\\{[^} ]+\\}|\\([^) ]+\\))" |
| 35 |
- identifier: "\\$[@^<*?%|+]|\\$\\([@^<*?%+-][DF]\\)" |
| 36 |
- identifier: "\\$\\$|\\\\.?" |
| 37 |
- comment: |
| 38 |
start: "#" |
| 39 |
end: "$" |
| 40 |
rules: [] |