-
Notifications
You must be signed in to change notification settings - Fork 0
/
typst-ts-faces.el
223 lines (168 loc) · 6.8 KB
/
typst-ts-faces.el
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
;;; typst-ts-faces.el --- typst-ts-mode faces -*- lexical-binding: t; -*-
;; Copyright (C) 2023-2024 The typst-ts-mode Project Contributors
;; This file is NOT part of Emacs.
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;; Face definitions.
;;; Code:
(defgroup typst-ts-faces nil
"Typst tree sitter faces."
:prefix "typst-ts-faces"
:group 'typst-ts)
(defcustom typst-ts-markup-header-same-height t
"Whether to make header face in markup context share the same height."
:type 'boolean
:group 'typst-ts-faces)
(defcustom typst-ts-markup-header-scale
'(2.0 1.7 1.4 1.1 1.0 1.0)
"Header Scale."
:type '(list number number number number number number)
:group 'typst-ts-faces)
;; Face =========================================================================
(defface typst-ts-watch-modeline-indicator-face
'((t :inherit (underline bold)))
"Face for typst watch modeline indicator.")
;; Common Face ==================================================================
(defface typst-ts-shorthand-face
'((t :inherit shadow))
"Face for linebreak.")
(defface typst-ts-error-face
'((t :inherit font-lock-warning-face))
"Face for linebreak.")
;; Markup Faces =================================================================
(defface typst-ts-markup-header-indicator-face
'((t :weight bold))
"Face for Typst ts markup header indicator.")
(defface typst-ts-markup-header-face
'((t :weight bold))
"Face for Typst ts markup headers text.")
(defface typst-ts-markup-header-indicator-face-1
`((t :inherit typst-ts-markup-header-indicator-face
:height ,(nth 0 typst-ts-markup-header-scale)))
"See `typst-ts-markup-header-indicator-face'.")
(defface typst-ts-markup-header-face-1
`((t :inherit typst-ts-markup-header-face
:height ,(nth 0 typst-ts-markup-header-scale)))
"See `typst-ts-markup-header-face'.")
(defface typst-ts-markup-header-indicator-face-2
`((t :inherit typst-ts-markup-header-indicator-face
:height ,(nth 1 typst-ts-markup-header-scale)))
"See `typst-ts-markup-header-indicator-face'.")
(defface typst-ts-markup-header-face-2
`((t :inherit typst-ts-markup-header-face
:height ,(nth 1 typst-ts-markup-header-scale)))
"See `typst-ts-markup-header-face'.")
(defface typst-ts-markup-header-indicator-face-3
`((t :inherit typst-ts-markup-header-indicator-face
:height ,(nth 2 typst-ts-markup-header-scale)))
"See `typst-ts-markup-header-indicator-face'.")
(defface typst-ts-markup-header-face-3
`((t :inherit typst-ts-markup-header-face
:height ,(nth 2 typst-ts-markup-header-scale)))
"See `typst-ts-markup-header-face'.")
(defface typst-ts-markup-header-indicator-face-4
`((t :inherit typst-ts-markup-header-indicator-face
:height ,(nth 3 typst-ts-markup-header-scale)))
"See `typst-ts-markup-header-indicator-face'.")
(defface typst-ts-markup-header-face-4
`((t :inherit typst-ts-markup-header-face
:height ,(nth 3 typst-ts-markup-header-scale)))
"See `typst-ts-markup-header-face'.")
(defface typst-ts-markup-header-indicator-face-5
`((t :inherit typst-ts-markup-header-indicator-face
:height ,(nth 4 typst-ts-markup-header-scale)))
"See `typst-ts-markup-header-indicator-face'.")
(defface typst-ts-markup-header-face-5
`((t :inherit typst-ts-markup-header-face
:height ,(nth 4 typst-ts-markup-header-scale)))
"See `typst-ts-markup-header-face'.")
(defface typst-ts-markup-header-indicator-face-6
`((t :inherit typst-ts-markup-header-indicator-face
:height ,(nth 5 typst-ts-markup-header-scale)))
"See `typst-ts-markup-header-indicator-face'.")
(defface typst-ts-markup-header-face-6
`((t :inherit typst-ts-markup-header-face
:height ,(nth 5 typst-ts-markup-header-scale)))
"See `typst-ts-markup-header-face'.")
(defface typst-ts-markup-url-face
'((t :inherit link))
"Face for url.")
(defface typst-ts-markup-emphasis-indicator-face
'((t :inherit italic))
"Face for emphasis.")
(defface typst-ts-markup-emphasis-face
'((t :inherit italic))
"Face for emphasis.")
(defface typst-ts-markup-strong-indicator-face
'((t :inherit bold))
"Face for strong.")
(defface typst-ts-markup-strong-face
'((t :inherit bold))
"Face for strong.")
(defface typst-ts-markup-item-indicator-face
'((t :inherit shadow))
"Face for item.")
(defface typst-ts-markup-term-indicator-face
'((t :inherit shadow))
"Face for term indicator.")
(defface typst-ts-markup-term-term-face
'((t :inherit bold))
"Face for term text.")
(defface typst-ts-markup-term-description-face
'((t :inherit italic))
"Face for term description.")
(defface typst-ts-markup-quote-face
'((t :inherit shadow))
"Face for quote.")
(defface typst-ts-markup-linebreak-face
'((t :inherit escape-glyph))
"Face for linebreak.")
(defface typst-ts-markup-escape-face
'((t :inherit escape-glyph))
"Face for linebreak.")
(defface typst-ts-markup-raw-indicator-face
'((t :inherit shadow))
"Face for rawblock and rawspan indicator.")
(defface typst-ts-markup-raw-blob-face
'((t :inherit shadow))
"Face for rawblock and rawspan blob.")
(defface typst-ts-markup-rawblock-indicator-face
'((t :inherit typst-ts-markup-raw-indicator-face))
"Face for rawblock indicator.")
(defface typst-ts-markup-rawblock-lang-face
'((t :inherit font-lock-type-face))
"Face for rawspan ident.")
(defface typst-ts-markup-rawblock-blob-face
'((t :inherit typst-ts-markup-raw-blob-face))
"Face for rawblock blob.")
(defface typst-ts-markup-rawspan-indicator-face
'((t :inherit typst-ts-markup-raw-indicator-face))
"Face for rawspan indicator.")
(defface typst-ts-markup-rawspan-blob-face
'((t :inherit typst-ts-markup-raw-blob-face))
"Face for rawspan blob.")
(defface typst-ts-markup-label-face
'((t :inherit homoglyph))
"Face for label.")
(defface typst-ts-markup-reference-face
'((t :inherit homoglyph))
"Face for reference.")
;; Code Faces ===================================================================
(defface typst-ts-code-indicator-face
'((t :inherit shadow))
"Face for code indicator #.")
;; Math Faces ===================================================================
(defface typst-ts-math-indicator-face
'((t :inherit shadow))
"Face for math indicator $.")
(provide 'typst-ts-faces)
;;; typst-ts-faces.el ends here