mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-17 19:00:02 -04:00
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:
parent
7bba891bae
commit
8d6192baa9
1 changed files with 15 additions and 15 deletions
|
|
@ -11,15 +11,6 @@
|
||||||
key: (_) @variable.parameter
|
key: (_) @variable.parameter
|
||||||
value: (_))
|
value: (_))
|
||||||
|
|
||||||
[
|
|
||||||
(line_comment)
|
|
||||||
(block_comment)
|
|
||||||
(comment_environment)
|
|
||||||
] @comment @spell
|
|
||||||
|
|
||||||
((line_comment) @keyword.directive
|
|
||||||
(#lua-match? @keyword.directive "^%% !TeX"))
|
|
||||||
|
|
||||||
[
|
[
|
||||||
(brack_group)
|
(brack_group)
|
||||||
(brack_group_argc)
|
(brack_group_argc)
|
||||||
|
|
@ -164,12 +155,6 @@
|
||||||
(curly_group
|
(curly_group
|
||||||
(_) @none @spell))
|
(_) @none @spell))
|
||||||
|
|
||||||
; Math
|
|
||||||
[
|
|
||||||
(displayed_equation)
|
|
||||||
(inline_formula)
|
|
||||||
] @markup.math
|
|
||||||
|
|
||||||
(math_environment
|
(math_environment
|
||||||
(begin
|
(begin
|
||||||
command: _ @markup.math
|
command: _ @markup.math
|
||||||
|
|
@ -313,6 +298,15 @@
|
||||||
(_) @markup.link.url))
|
(_) @markup.link.url))
|
||||||
(#any-of? @_name "\\url" "\\href"))
|
(#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
|
; File inclusion commands
|
||||||
(class_include
|
(class_include
|
||||||
command: _ @keyword.import
|
command: _ @keyword.import
|
||||||
|
|
@ -369,3 +363,9 @@
|
||||||
(label_reference) @nospell
|
(label_reference) @nospell
|
||||||
|
|
||||||
(label_reference_range) @nospell
|
(label_reference_range) @nospell
|
||||||
|
|
||||||
|
; Math
|
||||||
|
[
|
||||||
|
(displayed_equation)
|
||||||
|
(inline_formula)
|
||||||
|
] @markup.math
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue