diff --git a/languages.toml b/languages.toml index 5955823e7f92c..68876b9f8a4d0 100644 --- a/languages.toml +++ b/languages.toml @@ -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" @@ -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" } diff --git a/runtime/queries/amber/brackets.scm b/runtime/queries/amber/brackets.scm new file mode 100644 index 0000000000000..a945de723ddbd --- /dev/null +++ b/runtime/queries/amber/brackets.scm @@ -0,0 +1,6 @@ +("[" @open "]" @close) +("{" @open "}" @close) +("\"" @open "\"" @close) +("$" @open "$" @close) + +(interpolation "{" @open "}" @close) diff --git a/runtime/queries/amber/highlights.scm b/runtime/queries/amber/highlights.scm new file mode 100644 index 0000000000000..e0c530086ff88 --- /dev/null +++ b/runtime/queries/amber/highlights.scm @@ -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)