mirror of https://github.com/Wilfred/difftastic/
Syntax highlighting for Scala has been upstreamed
parent
f220319bba
commit
df0494fe00
@ -1,77 +0,0 @@
|
||||
;; TODO: upstream this.
|
||||
|
||||
;; Largely based on java.scm.
|
||||
|
||||
; 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"
|
||||
"new"
|
||||
"object"
|
||||
"override"
|
||||
"package"
|
||||
"private"
|
||||
"protected"
|
||||
"return"
|
||||
"sealed"
|
||||
"throw"
|
||||
"trait"
|
||||
"try"
|
||||
"while"
|
||||
"with"
|
||||
] @keyword
|
||||
@ -0,0 +1 @@
|
||||
../tree-sitter-scala/queries/highlights.scm
|
||||
Loading…
Reference in New Issue