mirror of https://github.com/helix-editor/helix
Update LaTex grammar (#4528)
Fix comment injection & add highlighting for math delimiters.pull/4449/head^2
parent
00cf12f571
commit
908529ccac
|
@ -570,7 +570,7 @@ indent = { tab-width = 4, unit = "\t" }
|
||||||
|
|
||||||
[[grammar]]
|
[[grammar]]
|
||||||
name = "latex"
|
name = "latex"
|
||||||
source = { git = "https://github.com/latex-lsp/tree-sitter-latex", rev = "b3b2cf27f33e71438ebe46934900b1153901c6f2" }
|
source = { git = "https://github.com/latex-lsp/tree-sitter-latex", rev = "8c75e93cd08ccb7ce1ccab22c1fbd6360e3bcea6" }
|
||||||
|
|
||||||
[[language]]
|
[[language]]
|
||||||
name = "lean"
|
name = "lean"
|
||||||
|
|
|
@ -29,6 +29,12 @@
|
||||||
(#eq? @punctuation.delimiter "&"))
|
(#eq? @punctuation.delimiter "&"))
|
||||||
|
|
||||||
["[" "]" "{" "}"] @punctuation.bracket ; "(" ")" has no syntactical meaning in LaTeX
|
["[" "]" "{" "}"] @punctuation.bracket ; "(" ")" has no syntactical meaning in LaTeX
|
||||||
|
(math_delimiter
|
||||||
|
left_command: _ @punctuation.delimiter
|
||||||
|
left_delimiter: _ @punctuation.delimiter
|
||||||
|
right_command: _ @punctuation.delimiter
|
||||||
|
right_delimiter: _ @punctuation.delimiter
|
||||||
|
)
|
||||||
|
|
||||||
;; General environments
|
;; General environments
|
||||||
(begin
|
(begin
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
((comment) @injection.content
|
((line_comment) @injection.content
|
||||||
(#set! injection.language "comment"))
|
(#set! injection.language "comment"))
|
||||||
|
|
Loading…
Reference in New Issue