Skip to content

Commit

Permalink
Add queries
Browse files Browse the repository at this point in the history
Co-authored-by: Phoenix Himself <pkaras.it@gmail.com>
  • Loading branch information
lens0021 and Ph0enixKM committed Nov 8, 2024
1 parent ee651af commit a16df57
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 2 deletions.
4 changes: 2 additions & 2 deletions languages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3858,7 +3858,7 @@ indent = { tab-width = 4, unit = " " }

[[grammar]]
name = "cylc"
source = { git = "https://github.com/amber-lang/tree-sitter-amber", rev = "c6df3ec2ec243ed76550c525e7ac3d9a10c6c814" }
source = { git = "https://github.com/elliotfontaine/tree-sitter-cylc", rev = "30dd40d9bf23912e4aefa93eeb4c7090bda3d0f6" }

[[language]]
name = "amber"
Expand All @@ -3869,4 +3869,4 @@ indent = { tab-width = 4, unit = " " }

[[grammar]]
name = "amber"
source = { git = "https://github.com/elliotfontaine/tree-sitter-amber", rev = "30dd40d9bf23912e4aefa93eeb4c7090bda3d0f6" }
source = { git = "https://github.com/amber-lang/tree-sitter-amber", rev = "c6df3ec2ec243ed76550c525e7ac3d9a10c6c814" }
6 changes: 6 additions & 0 deletions runtime/queries/amber/brackets.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
("[" @open "]" @close)
("{" @open "}" @close)
("\"" @open "\"" @close)
("$" @open "$" @close)

(interpolation "{" @open "}" @close)
60 changes: 60 additions & 0 deletions runtime/queries/amber/highlights.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
(comment) @comment

[
"if"
"loop"
"for"
"return"
"fun"
"else"
"then"
"break"
"continue"
"and"
"or"
"not"
"let"
"pub"
"main"
"echo"
"exit"
"fun"
"import"
"from"
"as"
"in"
"fail"
"failed"
"silent"
"nameof"
"is"
"unsafe"
"trust"
] @keyword

; Literals
(boolean) @constant.builtin.boolean
(number) @constant.numeric
(null) @constant.numeric
(string) @string
(status) @keyword
(command) @string
(handler) @keyword
(block) @delimeter
(variable_init) @keyword
(variable_assignment) @delimiter
(variable) @variable
(escape_sequence) @constant.character.escape
(type_name_symbol) @type
(interpolation) @delimiter
(reference) @keyword
(preprocessor_directive) @comment
(shebang) @comment
(function_definition
name: (variable) @function.method)
(function_call
name: (variable) @function.method)
(import_statement
"pub" @keyword
"import" @keyword
"from" @keyword)

0 comments on commit a16df57

Please sign in to comment.