mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-06 21:40:03 -04:00
feat(languagetree): implement language tree
Allow the LanguageTree to be used as an option for highlighting. Co-authored-by: Santos Gallegos <stsewd@protonmail.com> Co-authored-by: Yazdani Kiyan <yazdani.kiyan@protonmail.com>
This commit is contained in:
parent
e9b6e2d311
commit
f7d92f663c
5 changed files with 193 additions and 13 deletions
19
queries/markdown/highlights.scm
Normal file
19
queries/markdown/highlights.scm
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
(atx_heading) @text.title
|
||||
|
||||
[
|
||||
(code_span)
|
||||
(fenced_code_block)
|
||||
]@text.literal
|
||||
|
||||
(code_fence_content) @none
|
||||
|
||||
[
|
||||
(link_text)
|
||||
(image_description)
|
||||
] @text.strong
|
||||
|
||||
[
|
||||
(emphasis)
|
||||
(strong_emphasis)
|
||||
] @text.emphasis
|
||||
(link_destination) @text.uri
|
||||
6
queries/markdown/injections.scm
Normal file
6
queries/markdown/injections.scm
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
(fenced_code_block
|
||||
(info_string) @lang
|
||||
(code_fence_content) @injection)
|
||||
|
||||
((html_block) @injection
|
||||
(#set! "lang" "html"))
|
||||
Loading…
Add table
Add a link
Reference in a new issue