on master help sign in
Partly fix latex highlights and add markup scope docs
40969adBlaž Hrastnik
book/src/themes.md+14
@@ -162,6 +162,20 @@ We use a similar set of scopes as
162
162
163- `namespace`
163- `namespace`
164
164
165+- `markup`
166+ - `heading`
167+ - `list`
168+ - `unnumbered`
169+ - `numbered`
170+ - `bold`
171+ - `italic`
172+ - `underline`
173+ - `link`
174+ - `quote`
175+ - `raw`
176+ - `inline`
177+ - `block`
178+
165#### Interface
179#### Interface
166
180
167These scopes are used for theming the editor interface.
181These scopes are used for theming the editor interface.
runtime/queries/latex/highlights.scm+13−13
@@ -318,60 +318,60 @@
318["[" "]" "{" "}"] @punctuation.bracket ;"(" ")" is has no special meaning in LaTeX
318["[" "]" "{" "}"] @punctuation.bracket ;"(" ")" is has no special meaning in LaTeX
319
319
320(chapter
320(chapter
321− text: (brace_group) @text.title)
321+ text: (brace_group) @markup.heading)
322
322
323(part
323(part
324− text: (brace_group) @text.title)
324+ text: (brace_group) @markup.heading)
325
325
326(section
326(section
327− text: (brace_group) @text.title)
327+ text: (brace_group) @markup.heading)
328
328
329(subsection
329(subsection
330− text: (brace_group) @text.title)
330+ text: (brace_group) @markup.heading)
331
331
332(subsubsection
332(subsubsection
333− text: (brace_group) @text.title)
333+ text: (brace_group) @markup.heading)
334
334
335(paragraph
335(paragraph
336− text: (brace_group) @text.title)
336+ text: (brace_group) @markup.heading)
337
337
338(subparagraph
338(subparagraph
339− text: (brace_group) @text.title)
339+ text: (brace_group) @markup.heading)
340
340
341((environment
341((environment
342 (begin
342 (begin
343 name: (word) @_frame)
343 name: (word) @_frame)
344 (brace_group
344 (brace_group
345− child: (text) @text.title))
345+ child: (text) @markup.heading))
346 (#eq? @_frame "frame"))
346 (#eq? @_frame "frame"))
347
347
348((generic_command
348((generic_command
349 name:(generic_command_name) @_name
349 name:(generic_command_name) @_name
350 arg: (brace_group
350 arg: (brace_group
351− (text) @text.title))
351+ (text) @markup.heading))
352 (#eq? @_name "\\frametitle"))
352 (#eq? @_name "\\frametitle"))
353
353
354;; Formatting
354;; Formatting
355
355
356((generic_command
356((generic_command
357 name:(generic_command_name) @_name
357 name:(generic_command_name) @_name
358− arg: (_) @text.emphasis)
358+ arg: (_) @markup.italic)
359 (#eq? @_name "\\emph"))
359 (#eq? @_name "\\emph"))
360
360
361((generic_command
361((generic_command
362 name:(generic_command_name) @_name
362 name:(generic_command_name) @_name
363− arg: (_) @text.emphasis)
363+ arg: (_) @markup.italic)
364 (#match? @_name "^(\\\\textit|\\\\mathit)$"))
364 (#match? @_name "^(\\\\textit|\\\\mathit)$"))
365
365
366((generic_command
366((generic_command
367 name:(generic_command_name) @_name
367 name:(generic_command_name) @_name
368− arg: (_) @text.strong)
368+ arg: (_) @markup.bold)
369 (#match? @_name "^(\\\\textbf|\\\\mathbf)$"))
369 (#match? @_name "^(\\\\textbf|\\\\mathbf)$"))
370
370
371((generic_command
371((generic_command
372 name:(generic_command_name) @_name
372 name:(generic_command_name) @_name
373 .
373 .
374− arg: (_) @text.uri)
374+ arg: (_) @markup.underline.link)
375 (#match? @_name "^(\\\\url|\\\\href)$"))
375 (#match? @_name "^(\\\\url|\\\\href)$"))
376
376
377(ERROR) @error
377(ERROR) @error