aboutsummaryrefslogtreecommitdiffstats
path: root/queries/latex
diff options
context:
space:
mode:
authorRiley Bruins <ribru17@hotmail.com>2024-01-21 20:52:06 -0800
committerChristian Clason <c.clason@uni-graz.at>2024-01-24 13:25:42 +0100
commitf72d9169f26e06d31fec2eafd054e19ea629c256 (patch)
treef719bdecd08523d6071e1242d69ebcc8b5c40add /queries/latex
parentci: bump cache to v4 (diff)
downloadnvim-treesitter-f72d9169f26e06d31fec2eafd054e19ea629c256.tar
nvim-treesitter-f72d9169f26e06d31fec2eafd054e19ea629c256.tar.gz
nvim-treesitter-f72d9169f26e06d31fec2eafd054e19ea629c256.tar.bz2
nvim-treesitter-f72d9169f26e06d31fec2eafd054e19ea629c256.tar.lz
nvim-treesitter-f72d9169f26e06d31fec2eafd054e19ea629c256.tar.xz
nvim-treesitter-f72d9169f26e06d31fec2eafd054e19ea629c256.tar.zst
nvim-treesitter-f72d9169f26e06d31fec2eafd054e19ea629c256.zip
fix(latex): better environment precedence
Diffstat (limited to 'queries/latex')
-rw-r--r--queries/latex/highlights.scm18
1 files changed, 9 insertions, 9 deletions
diff --git a/queries/latex/highlights.scm b/queries/latex/highlights.scm
index f1a8c814f..78debda96 100644
--- a/queries/latex/highlights.scm
+++ b/queries/latex/highlights.scm
@@ -156,6 +156,12 @@
(curly_group_text
(_) @markup.link))
+; Formatting
+(text_mode
+ content:
+ (curly_group
+ (_) @none @spell))
+
; Math
[
(displayed_equation)
@@ -167,17 +173,17 @@
command: _ @markup.math
name:
(curly_group_text
- (text) @markup.math)))
+ (_) @markup.math)))
(math_environment
- (text) @markup.math)
+ (_) @markup.math)
(math_environment
(end
command: _ @markup.math
name:
(curly_group_text
- (text) @markup.math)))
+ (_) @markup.math)))
; Sectioning
(title_declaration
@@ -276,12 +282,6 @@
(text) @markup.heading))
(#eq? @_name "\\frametitle"))
-; Formatting
-(text_mode
- content:
- (curly_group
- (_) @none @spell))
-
((generic_command
command: (command_name) @_name
arg: