From f5c4671bfbad96bf346bd7e9a21fc4317b4959df Mon Sep 17 00:00:00 2001 From: Indrajith K L Date: Sat, 3 Dec 2022 17:00:20 +0530 Subject: Adds most of the tools --- .../runtime/queries/tablegen/highlights.scm | 90 ++++++++++++++++++++++ .../runtime/queries/tablegen/indents.toml | 7 ++ .../runtime/queries/tablegen/injections.scm | 2 + .../runtime/queries/tablegen/textobjects.scm | 16 ++++ 4 files changed, 115 insertions(+) create mode 100644 helix-22.03-x86_64-windows/runtime/queries/tablegen/highlights.scm create mode 100644 helix-22.03-x86_64-windows/runtime/queries/tablegen/indents.toml create mode 100644 helix-22.03-x86_64-windows/runtime/queries/tablegen/injections.scm create mode 100644 helix-22.03-x86_64-windows/runtime/queries/tablegen/textobjects.scm (limited to 'helix-22.03-x86_64-windows/runtime/queries/tablegen') diff --git a/helix-22.03-x86_64-windows/runtime/queries/tablegen/highlights.scm b/helix-22.03-x86_64-windows/runtime/queries/tablegen/highlights.scm new file mode 100644 index 0000000..8ade5ba --- /dev/null +++ b/helix-22.03-x86_64-windows/runtime/queries/tablegen/highlights.scm @@ -0,0 +1,90 @@ +[ + (comment) + (multiline_comment) +] @comment + +[ + "(" + ")" + "[" + "]" + "{" + "}" + "<" + ">" +] @punctuation.bracket + +[ + "," + ";" + "." +] @punctuation.delimiter + +[ + "#" + "-" + "..." + ":" +] @operator + +[ + "=" + "!cond" + (operator_keyword) +] @function + +[ + "true" + "false" +] @constant.builtin.boolean + +[ + "?" +] @constant.builtin + +(var) @variable + +(template_arg (identifier) @variable.parameter) + +(_ argument: (value (identifier) @variable.parameter)) + +(type) @type + +"code" @type.builtin + +(number) @constant.numeric.integer +[ + (string_string) + (code_string) +] @string + +(preprocessor) @keyword.directive + +[ + "class" + "field" + "let" + "defvar" + "def" + "defset" + "defvar" + "assert" +] @keyword + +[ + "let" + "in" + "foreach" + "if" + "then" + "else" +] @keyword.operator + +"include" @keyword.control.import + +[ + "multiclass" + "defm" +] @namespace + +(ERROR) @error diff --git a/helix-22.03-x86_64-windows/runtime/queries/tablegen/indents.toml b/helix-22.03-x86_64-windows/runtime/queries/tablegen/indents.toml new file mode 100644 index 0000000..43532f4 --- /dev/null +++ b/helix-22.03-x86_64-windows/runtime/queries/tablegen/indents.toml @@ -0,0 +1,7 @@ +indent = [ + "statement", +] + +outdent = [ + "}", +] diff --git a/helix-22.03-x86_64-windows/runtime/queries/tablegen/injections.scm b/helix-22.03-x86_64-windows/runtime/queries/tablegen/injections.scm new file mode 100644 index 0000000..0b476f8 --- /dev/null +++ b/helix-22.03-x86_64-windows/runtime/queries/tablegen/injections.scm @@ -0,0 +1,2 @@ +([ (comment) (multiline_comment)] @injection.content + (#set! injection.language "comment")) diff --git a/helix-22.03-x86_64-windows/runtime/queries/tablegen/textobjects.scm b/helix-22.03-x86_64-windows/runtime/queries/tablegen/textobjects.scm new file mode 100644 index 0000000..89645b3 --- /dev/null +++ b/helix-22.03-x86_64-windows/runtime/queries/tablegen/textobjects.scm @@ -0,0 +1,16 @@ +(class + body: (_) @class.inside) @class.around + +(multiclass + body: (_) @class.inside) @class.around + +(_ argument: _ @parameter.inside) + +[ + (comment) + (multiline_comment) +] @comment.inside + +(comment)+ @comment.around + +(multiline_comment) @comment.around -- cgit v1.2.3