summaryrefslogtreecommitdiffstats
path: root/queries/xml/highlights.scm
blob: e47636ac4c9a47a79900eb79df6f57569a6507c4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
; inherits: dtd

;; XML declaration

(XMLDecl "standalone" @tag.attribute)

(XMLDecl [ "yes" "no" ] @boolean)

;; Processing instructions

(XmlModelPI "xml-model" @preproc)

(StyleSheetPI "xml-stylesheet" @preproc)

(PseudoAtt (Name) @tag.attribute)

(PseudoAtt (PseudoAttValue) @string)

;; Doctype declaration

(doctypedecl "DOCTYPE" @define)

(doctypedecl (Name) @type.definition)

;; Tags

(STag (Name) @tag)

(ETag (Name) @tag)

(EmptyElemTag (Name) @tag)

;; Attributes

(Attribute (Name) @tag.attribute)

(Attribute (AttValue) @string)

;; Text

(CharData) @text @spell

((CDSect
  (CDStart) @text.environment
  (CData) @text.literal
  "]]>" @text.environment)
 (#set! "priority" 105))

;; Delimiters & punctuation

[ "<" "</" "/>" ] @tag.delimiter

"]" @punctuation.bracket