-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Erin van der Veen
committed
Apr 20, 2022
1 parent
893963d
commit 42dbe26
Showing
4 changed files
with
99 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
(types) @type | ||
(type_builtin) @type.builtin | ||
"Array" @type.builtin | ||
|
||
(enum_tag) @constructor | ||
|
||
"null" @constant.builtin | ||
(bool) @constant.builtin.boolean | ||
(str_esc_char) @constant.character.escape | ||
(num_literal) @constant.numeric | ||
|
||
(str_chunks) @string | ||
|
||
; NOTE: Nickel has no block comments | ||
(comment) @comment.line | ||
; Nickel doesn't use comments for documentation, ideally this would be | ||
; `@documentation` or something similar | ||
(annot_atom | ||
doc: (static_string) @comment.block.documentation | ||
) | ||
|
||
(record_operand (atom (ident) @variable)) | ||
(let_expr | ||
"let" @keyword | ||
pat: (pattern | ||
(ident) @variable | ||
) | ||
"in" @keyword | ||
) | ||
(fun_expr | ||
"fun" @keyword.function | ||
pats: | ||
(pattern | ||
id: (ident) @variable.parameter | ||
)+ | ||
) | ||
(record_field) @variable.other.member | ||
|
||
[ | ||
"." | ||
] @punctuation.delimiter | ||
[ | ||
"{" "}" | ||
"(" ")" | ||
"[|" "|]" | ||
"[" "]" | ||
] @punctuation.bracket | ||
(multstr_start) @punctuation.bracket | ||
(multstr_end) @punctuation.bracket | ||
(interpolation_start) @punctuation.bracket | ||
(interpolation_end) @punctuation.bracket | ||
|
||
["forall" "default" "doc"] @keyword | ||
["if" "then" "else" "switch"] @keyword.control.conditional | ||
"import" @keyword.control.import | ||
|
||
(infix_expr | ||
op: (_) @operator | ||
) | ||
|
||
(applicative | ||
t1: (applicative | ||
(record_operand) @function | ||
) | ||
) | ||
(builtin) @function.builtin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[ | ||
(fun_expr) | ||
(let_expr) | ||
(switch_expr) | ||
(ite_expr) | ||
|
||
(uni_record) | ||
(str_chunks_multi) | ||
"[" | ||
"[|" | ||
] @indent | ||
|
||
[ | ||
"}" | ||
"]" | ||
"|]" | ||
] @outdent |