mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
feat(latex): capture conditionals
Generically, macros/commands in LaTeX starting on `if` are either directly conditionals, or have similar purpose/funcionality. Signed-off-by: Jonas Dujava <jonas.dujava@gmail.com>
This commit is contained in:
parent
4770d9a1a7
commit
13ee7f8844
1 changed files with 8 additions and 0 deletions
|
|
@ -238,6 +238,14 @@
|
|||
(_) @markup.strong))
|
||||
(#any-of? @_name "\\textbf" "\\mathbf"))
|
||||
|
||||
(generic_command
|
||||
(command_name) @keyword.conditional
|
||||
(#lua-match? @keyword.conditional "^\\if[a-zA-Z@]+$"))
|
||||
|
||||
(generic_command
|
||||
(command_name) @keyword.conditional
|
||||
(#any-of? @keyword.conditional "\\fi" "\\else"))
|
||||
|
||||
; File inclusion commands
|
||||
(class_include
|
||||
command: _ @keyword.import
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue