Skip to content

Commit

Permalink
Update languages.toml for Nickel (helix-editor#7059)
Browse files Browse the repository at this point in the history
vkleen authored and Schuyler Mortimer committed Jul 10, 2024
1 parent 972307b commit 047ef78
Showing 4 changed files with 13 additions and 4 deletions.
8 changes: 7 additions & 1 deletion languages.toml
Original file line number Diff line number Diff line change
@@ -648,9 +648,15 @@ comment-token = "#"
language-servers = [ "nls" ]
indent = { tab-width = 2, unit = " " }

[language.auto-pairs]
'(' = ')'
'{' = '}'
'[' = ']'
'"' = '"'

[[grammar]]
name = "nickel"
source = { git = "https://github.com/nickel-lang/tree-sitter-nickel", rev = "9d83db400b6c11260b9106f131f93ddda8131933" }
source = { git = "https://github.com/nickel-lang/tree-sitter-nickel", rev = "3a794388773f2424a97b2186828aa3fac4c66ce6" }

[[language]]
name = "nix"
4 changes: 2 additions & 2 deletions runtime/queries/nickel/highlights.scm
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@
)

(record_operand (atom (ident) @variable))
(let_expr
(let_in_block
"let" @keyword
"rec"? @keyword
pat: (pattern
@@ -53,7 +53,7 @@
(interpolation_end) @punctuation.bracket

["forall" "default" "doc"] @keyword
["if" "then" "else" "switch"] @keyword.control.conditional
["if" "then" "else" "match"] @keyword.control.conditional
"import" @keyword.control.import

(infix_expr
2 changes: 1 addition & 1 deletion runtime/queries/nickel/indents.scm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
(fun_expr)
(let_expr)
(switch_expr)
(match_expr)
(ite_expr)

(uni_record)
3 changes: 3 additions & 0 deletions runtime/queries/nickel/injections.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
(annot_atom doc: (static_string)
@injection.content
(#set! injection.language "markdown"))

0 comments on commit 047ef78

Please sign in to comment.