fix(latex): give comments higher precedence

This commit also moves things around to give text better precedence in
the case of `textit` and `textbf`.
This commit is contained in:
Riley Bruins 2024-02-04 09:01:25 -08:00 committed by Christian Clason
parent 7bba891bae
commit 8d6192baa9

View file

@ -11,15 +11,6 @@
key: (_) @variable.parameter
value: (_))
[
(line_comment)
(block_comment)
(comment_environment)
] @comment @spell
((line_comment) @keyword.directive
(#lua-match? @keyword.directive "^%% !TeX"))
[
(brack_group)
(brack_group_argc)
@ -164,12 +155,6 @@
(curly_group
(_) @none @spell))
; Math
[
(displayed_equation)
(inline_formula)
] @markup.math
(math_environment
(begin
command: _ @markup.math
@ -313,6 +298,15 @@
(_) @markup.link.url))
(#any-of? @_name "\\url" "\\href"))
[
(line_comment)
(block_comment)
(comment_environment)
] @comment @spell
((line_comment) @keyword.directive
(#lua-match? @keyword.directive "^%% !TeX"))
; File inclusion commands
(class_include
command: _ @keyword.import
@ -369,3 +363,9 @@
(label_reference) @nospell
(label_reference_range) @nospell
; Math
[
(displayed_equation)
(inline_formula)
] @markup.math