mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17: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
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue