aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRiley Bruins <ribru17@hotmail.com>2024-02-04 09:01:25 -0800
committerChristian Clason <c.clason@uni-graz.at>2024-02-06 10:29:09 +0100
commit8d6192baa9f78990cf784c57784506e60ce573c4 (patch)
treea9456c9b3161b5b97d156f37ef7b3208b4cfa47c
parentUpdate parsers: angular, bash, gitcommit, glsl, hlsl, php, php_only, templ, wing (diff)
downloadnvim-treesitter-8d6192baa9f78990cf784c57784506e60ce573c4.tar
nvim-treesitter-8d6192baa9f78990cf784c57784506e60ce573c4.tar.gz
nvim-treesitter-8d6192baa9f78990cf784c57784506e60ce573c4.tar.bz2
nvim-treesitter-8d6192baa9f78990cf784c57784506e60ce573c4.tar.lz
nvim-treesitter-8d6192baa9f78990cf784c57784506e60ce573c4.tar.xz
nvim-treesitter-8d6192baa9f78990cf784c57784506e60ce573c4.tar.zst
nvim-treesitter-8d6192baa9f78990cf784c57784506e60ce573c4.zip
fix(latex): give comments higher precedence
This commit also moves things around to give text better precedence in the case of `textit` and `textbf`.
-rw-r--r--queries/latex/highlights.scm30
1 files changed, 15 insertions, 15 deletions
diff --git a/queries/latex/highlights.scm b/queries/latex/highlights.scm
index aad68e4f7..a249d04bb 100644
--- a/queries/latex/highlights.scm
+++ b/queries/latex/highlights.scm
@@ -12,15 +12,6 @@
value: (_))
[
- (line_comment)
- (block_comment)
- (comment_environment)
-] @comment @spell
-
-((line_comment) @keyword.directive
- (#lua-match? @keyword.directive "^%% !TeX"))
-
-[
(brack_group)
(brack_group_argc)
] @variable.parameter
@@ -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