diff --git a/tree-sitter-kerolox/queries/highlights.scm b/tree-sitter-kerolox/queries/highlights.scm index 1eadda3..2b616df 100644 --- a/tree-sitter-kerolox/queries/highlights.scm +++ b/tree-sitter-kerolox/queries/highlights.scm @@ -1,14 +1,17 @@ ; TODO: automate highlighting testing +; TODO: ensure that name segments are highlighted correctly in each context (comment) @comment.line (integer) @constant.numeric +(string) @string.quoted +(escape_sequence) @constant.character.escape (variable) @variable -(expr (symbol) @constant) +(expr symbol: _ @constant) (import (symbol) @module) -(type (symbol)) @type +(type (name)) @type (type_alias name: _ @type) -(rule relation: (symbol) @constructor) +(rule relation: (name) @constructor) (relation name: (symbol) @function) (apply head: _ @function)