1
0

lua.scm 879 B

123456789101112131415161718192021222324252627282930313233
  1. ;; ============================================================================
  2. ;; Tree-sitter Query File for Lua (highlights.scm)
  3. ;; ============================================================================
  4. ;; Keywords
  5. [
  6. "and" "do" "else" "elseif" "end"
  7. "for" "function" "goto" "if" "in"
  8. "local" "not" "or" "repeat" "return"
  9. "then" "until" "while"
  10. ] @keyword
  11. ;; Literals and Constants
  12. (string) @string
  13. (number) @number
  14. ;; Comments
  15. [
  16. (comment)
  17. (hash_bang_line)
  18. ] @comment
  19. ;; Parameters and Variables
  20. (parameters (identifier) @variable.parameter)
  21. ;; Table Fields
  22. (field name: (identifier) @property)
  23. (dot_index_expression field: (identifier) @property)
  24. ;; Punctuation & Operators
  25. [ "," "." ";" ":" "#" ] @punctuation.delimiter
  26. [ "(" ")" "{" "}" "[" "]" ] @punctuation.bracket
  27. [ "=" "==" "~=" "<" "<=" ">" ">=" "+" "-" "*" "/" "//" "^" "%" ".." ] @operator