Skip to content

Commit 06929ff

Browse files
vkleenwes-adams
authored andcommitted
Update languages.toml for Nickel (helix-editor#7059)
1 parent fd3e6a9 commit 06929ff

4 files changed

Lines changed: 13 additions & 4 deletions

File tree

languages.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,9 +648,15 @@ comment-token = "#"
648648
language-servers = [ "nls" ]
649649
indent = { tab-width = 2, unit = " " }
650650

651+
[language.auto-pairs]
652+
'(' = ')'
653+
'{' = '}'
654+
'[' = ']'
655+
'"' = '"'
656+
651657
[[grammar]]
652658
name = "nickel"
653-
source = { git = "https://github.com/nickel-lang/tree-sitter-nickel", rev = "9d83db400b6c11260b9106f131f93ddda8131933" }
659+
source = { git = "https://github.com/nickel-lang/tree-sitter-nickel", rev = "3a794388773f2424a97b2186828aa3fac4c66ce6" }
654660

655661
[[language]]
656662
name = "nix"

runtime/queries/nickel/highlights.scm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
)
2121

2222
(record_operand (atom (ident) @variable))
23-
(let_expr
23+
(let_in_block
2424
"let" @keyword
2525
"rec"? @keyword
2626
pat: (pattern
@@ -53,7 +53,7 @@
5353
(interpolation_end) @punctuation.bracket
5454

5555
["forall" "default" "doc"] @keyword
56-
["if" "then" "else" "switch"] @keyword.control.conditional
56+
["if" "then" "else" "match"] @keyword.control.conditional
5757
"import" @keyword.control.import
5858

5959
(infix_expr

runtime/queries/nickel/indents.scm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[
22
(fun_expr)
33
(let_expr)
4-
(switch_expr)
4+
(match_expr)
55
(ite_expr)
66

77
(uni_record)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
(annot_atom doc: (static_string)
2+
@injection.content
3+
(#set! injection.language "markdown"))

0 commit comments

Comments
 (0)