on master help sign in
Partly fix latex highlights and add markup scope docs
commit40969ad4528bbb774e2b95dce0749b1dd3734ebf authorBlaž Hrastnik <blaz@mxxn.io> dateWed 15 Dec 2021, 17:46 (5 years ago) parent9bfb701
2 files changed+27−13
book/src/themes.md+14 runtime/queries/latex/highlights.scm+13−13
book/src/themes.md+14
@@ -162,6 +162,20 @@ We use a similar set of scopes as
162162
163163- `namespace`
164164
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+
165179#### Interface
166180
167181These scopes are used for theming the editor interface.
runtime/queries/latex/highlights.scm+13−13
@@ -318,60 +318,60 @@
318318["[" "]" "{" "}"] @punctuation.bracket ;"(" ")" is has no special meaning in LaTeX
319319
320320(chapter
321− text: (brace_group) @text.title)
321+ text: (brace_group) @markup.heading)
322322
323323(part
324− text: (brace_group) @text.title)
324+ text: (brace_group) @markup.heading)
325325
326326(section
327− text: (brace_group) @text.title)
327+ text: (brace_group) @markup.heading)
328328
329329(subsection
330− text: (brace_group) @text.title)
330+ text: (brace_group) @markup.heading)
331331
332332(subsubsection
333− text: (brace_group) @text.title)
333+ text: (brace_group) @markup.heading)
334334
335335(paragraph
336− text: (brace_group) @text.title)
336+ text: (brace_group) @markup.heading)
337337
338338(subparagraph
339− text: (brace_group) @text.title)
339+ text: (brace_group) @markup.heading)
340340
341341((environment
342342 (begin
343343 name: (word) @_frame)
344344 (brace_group
345− child: (text) @text.title))
345+ child: (text) @markup.heading))
346346 (#eq? @_frame "frame"))
347347
348348((generic_command
349349 name:(generic_command_name) @_name
350350 arg: (brace_group
351− (text) @text.title))
351+ (text) @markup.heading))
352352 (#eq? @_name "\\frametitle"))
353353
354354;; Formatting
355355
356356((generic_command
357357 name:(generic_command_name) @_name
358− arg: (_) @text.emphasis)
358+ arg: (_) @markup.italic)
359359 (#eq? @_name "\\emph"))
360360
361361((generic_command
362362 name:(generic_command_name) @_name
363− arg: (_) @text.emphasis)
363+ arg: (_) @markup.italic)
364364 (#match? @_name "^(\\\\textit|\\\\mathit)$"))
365365
366366((generic_command
367367 name:(generic_command_name) @_name
368− arg: (_) @text.strong)
368+ arg: (_) @markup.bold)
369369 (#match? @_name "^(\\\\textbf|\\\\mathbf)$"))
370370
371371((generic_command
372372 name:(generic_command_name) @_name
373373 .
374− arg: (_) @text.uri)
374+ arg: (_) @markup.underline.link)
375375 (#match? @_name "^(\\\\url|\\\\href)$"))
376376
377377(ERROR) @error