Merge commit 'ec6047f531e7d4c13787d4ff208b94a84de34165'

pull/261/head
Wilfred Hughes 2022-04-17 17:04:59 +07:00
commit f220319bba
1 changed files with 74 additions and 0 deletions

@ -0,0 +1,74 @@
;; Annotations
"@" @operator
;; Types
(class_definition
name: (identifier) @type)
(trait_definition
name: (identifier) @type)
(object_definition
name: (identifier) @type)
(type_identifier) @type
;; Variables
((identifier) @constant
(#match? @constant "^_*[A-Z][A-Z\\d_]+$"))
(identifier) @variable
;; Literals
[
(integer_literal)
(floating_point_literal)
] @number
[
(character_literal)
(string)
] @string
[
(boolean_literal)
(null_literal)
] @constant.builtin
(comment) @comment
;; Keywords
[
"abstract"
"case"
"catch"
"class"
"def"
"do"
"else"
"extends"
"final"
"finally"
"for"
"if"
"implicit"
"import"
"lazy"
"match"
"new"
"object"
"override"
"package"
"private"
"protected"
"return"
"sealed"
"throw"
"trait"
"try"
"while"
"with"
] @keyword