aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries/latex
diff options
context:
space:
mode:
authorBlaž Hrastnik2022-02-13 09:31:51 +0000
committerBlaž Hrastnik2022-02-13 09:31:51 +0000
commitbd549d8a20cce98e24c8653a4a86107c786cbaa3 (patch)
tree0780b58d41b6181e69023265cdb54517e2953778 /runtime/queries/latex
parent7ad8eaaef0b292f4be6c66298cea40d2b928e172 (diff)
parent7083b98a388b30e0b61caac9bf6ccc1d79eadf81 (diff)
Merge remote-tracking branch 'origin/master' into debug
Diffstat (limited to 'runtime/queries/latex')
-rw-r--r--runtime/queries/latex/highlights.scm28
-rw-r--r--runtime/queries/latex/injections.scm2
2 files changed, 16 insertions, 14 deletions
diff --git a/runtime/queries/latex/highlights.scm b/runtime/queries/latex/highlights.scm
index f045c82d..0a030b31 100644
--- a/runtime/queries/latex/highlights.scm
+++ b/runtime/queries/latex/highlights.scm
@@ -278,7 +278,7 @@
"\\includeinkscape"
"\\usepgflibrary"
"\\usetikzlibrary"
-] @include
+] @keyword.control.import
[
"\\part"
@@ -318,60 +318,60 @@
["[" "]" "{" "}"] @punctuation.bracket ;"(" ")" is has no special meaning in LaTeX
(chapter
- text: (brace_group) @text.title)
+ text: (brace_group) @markup.heading)
(part
- text: (brace_group) @text.title)
+ text: (brace_group) @markup.heading)
(section
- text: (brace_group) @text.title)
+ text: (brace_group) @markup.heading)
(subsection
- text: (brace_group) @text.title)
+ text: (brace_group) @markup.heading)
(subsubsection
- text: (brace_group) @text.title)
+ text: (brace_group) @markup.heading)
(paragraph
- text: (brace_group) @text.title)
+ text: (brace_group) @markup.heading)
(subparagraph
- text: (brace_group) @text.title)
+ text: (brace_group) @markup.heading)
((environment
(begin
name: (word) @_frame)
(brace_group
- child: (text) @text.title))
+ child: (text) @markup.heading))
(#eq? @_frame "frame"))
((generic_command
name:(generic_command_name) @_name
arg: (brace_group
- (text) @text.title))
+ (text) @markup.heading))
(#eq? @_name "\\frametitle"))
;; Formatting
((generic_command
name:(generic_command_name) @_name
- arg: (_) @text.emphasis)
+ arg: (_) @markup.italic)
(#eq? @_name "\\emph"))
((generic_command
name:(generic_command_name) @_name
- arg: (_) @text.emphasis)
+ arg: (_) @markup.italic)
(#match? @_name "^(\\\\textit|\\\\mathit)$"))
((generic_command
name:(generic_command_name) @_name
- arg: (_) @text.strong)
+ arg: (_) @markup.bold)
(#match? @_name "^(\\\\textbf|\\\\mathbf)$"))
((generic_command
name:(generic_command_name) @_name
.
- arg: (_) @text.uri)
+ arg: (_) @markup.link.url)
(#match? @_name "^(\\\\url|\\\\href)$"))
(ERROR) @error
diff --git a/runtime/queries/latex/injections.scm b/runtime/queries/latex/injections.scm
new file mode 100644
index 00000000..321c90ad
--- /dev/null
+++ b/runtime/queries/latex/injections.scm
@@ -0,0 +1,2 @@
+((comment) @injection.content
+ (#set! injection.language "comment"))