Skip to content

Commit

Permalink
chore: update cairo tree sitter + queries (helix-editor#11067)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xLucqs authored and Schuyler Mortimer committed Jul 10, 2024
1 parent 8e38411 commit 544dd85
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion languages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2081,7 +2081,7 @@ language-servers = [ "cairo-language-server" ]

[[grammar]]
name = "cairo"
source = { git = "https://github.com/starkware-libs/tree-sitter-cairo", rev = "0596baab741ffacdc65c761d5d5ffbbeae97f033" }
source = { git = "https://github.com/starkware-libs/tree-sitter-cairo", rev = "e3a0212261c125cb38248458cd856c0ffee2b398" }

[[language]]
name = "cpon"
Expand Down
6 changes: 6 additions & 0 deletions runtime/queries/cairo/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@
; -------
; Keywords
; -------

(for_expression
"for" @keyword.control.repeat)

"in" @keyword.control

[
"match"
"if"
Expand Down
8 changes: 7 additions & 1 deletion runtime/queries/cairo/indents.scm
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,10 @@
(#not-same-line? @expr-start @pattern-guard)
) @indent


(for_expression
"in" @in
.
(_) @indent
(#not-same-line? @in @indent)
(#set! "scope" "all")
)

0 comments on commit 544dd85

Please sign in to comment.