diff options
| author | Christian Clason <c.clason@uni-graz.at> | 2023-06-12 09:54:30 -0600 |
|---|---|---|
| committer | Christian Clason <c.clason@uni-graz.at> | 2025-05-12 18:43:40 +0200 |
| commit | 692b051b09935653befdb8f7ba8afdb640adf17b (patch) | |
| tree | 167162b6b129ae04f68c5735078521a72917c742 /runtime/queries/inko/highlights.scm | |
| parent | feat(c-family): inherit injections (diff) | |
| download | nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.gz nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.bz2 nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.lz nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.xz nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.zst nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.zip | |
feat!: drop modules, general refactor and cleanup
Diffstat (limited to 'runtime/queries/inko/highlights.scm')
| -rw-r--r-- | runtime/queries/inko/highlights.scm | 203 |
1 files changed, 203 insertions, 0 deletions
diff --git a/runtime/queries/inko/highlights.scm b/runtime/queries/inko/highlights.scm new file mode 100644 index 000000000..989bdb9e8 --- /dev/null +++ b/runtime/queries/inko/highlights.scm @@ -0,0 +1,203 @@ +; Brackets and operators +[ + "(" + ")" + "[" + "]" + "{" + "}" +] @punctuation.bracket + +[ + "," + "->" + "." + ":" +] @punctuation.delimiter + +[ + "!=" + "%" + "%=" + "&" + "&=" + "*" + "**" + "**=" + "*=" + "+" + "+=" + "-" + "-=" + "/" + "/=" + "<" + "<<" + "<<=" + "<=" + "<=" + "==" + ">" + ">=" + ">=" + ">>" + ">>=" + ">>>" + ">>>=" + "^" + "^=" + "|" + "|=" +] @operator + +; Keywords +[ + "as" + "copy" + "for" + "impl" + "in" + "inline" + "let" + "move" + "mut" + "recover" + "ref" + "uni" +] @keyword + +"fn" @keyword.function + +"import" @keyword.import + +[ + "and" + "or" +] @keyword.operator + +[ + "trait" + "type" +] @keyword.type + +[ + "extern" + (modifier) + (visibility) +] @keyword.modifier + +[ + "loop" + "while" + (break) + (next) +] @keyword.repeat + +"return" @keyword.return + +[ + "throw" + "try" +] @keyword.exception + +[ + "case" + "else" + "if" + "match" +] @keyword.conditional + +; Identifiers/variable references +(identifier) @variable + +; Comments +(line_comment) @comment @spell + +; Literals +(self) @variable.builtin + +(nil) @constant.builtin + +[ + (true) + (false) +] @boolean + +(integer) @number + +(float) @number.float + +(string) @string + +(escape_sequence) @string.escape + +(interpolation + "${" @punctuation.special + "}" @punctuation.special) @none + +(constant) @constant + +; Patterns +(integer_pattern) @number + +(string_pattern) @string + +(constant_pattern) @constant + +(boolean_pattern) @boolean + +; Types +(generic_type + name: _ @type) + +(type) @type + +; Imports +(extern_import + path: _ @string) + +(import + (path + (identifier) @module)) + +; Classes +(class + name: _ @type) + +(define_field + name: _ @variable.member) + +; Traits +(trait + name: _ @type) + +; Implementations +(implement_trait + class: _ @type) + +(reopen_class + name: _ @type) + +(bound + name: _ @type) + +; Methods +(method + name: _ @function) + +(external_function + name: _ @function) + +(argument + name: _ @variable.parameter) + +(named_argument + name: _ @variable.parameter) + +(call + name: [ + (name) + (constant) + ] @function) + +(field) @variable.member |
