mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
fix(vimdoc): adapt to breaking Neovim change
Problem:
cb46f6e467 (diff-edf997b0c2d42d31828800641ac1f5a46487fe24a0d46ccf70bcd58a14f3868f)
introduced a regression on how `#set!` behaves with several matches in a
single pattern, breaking conceals in, e.g., taglinks.
Solution: Separate taglink etc. patterns into concealed marker and
contents. Also add URL support for concealed markdown links.
This commit is contained in:
parent
497fe685ff
commit
3ae78f376c
2 changed files with 14 additions and 3 deletions
|
|
@ -33,6 +33,11 @@
|
|||
] @markup.link
|
||||
(#set! conceal ""))
|
||||
|
||||
(inline_link
|
||||
(link_text) @markup.link.label
|
||||
(link_destination) @markup.link
|
||||
(#set! @markup.link.label "url" @markup.link))
|
||||
|
||||
; Conceal image links
|
||||
(image
|
||||
[
|
||||
|
|
|
|||
|
|
@ -12,12 +12,16 @@
|
|||
|
||||
(tag
|
||||
"*" @label
|
||||
(#set! conceal "")
|
||||
(#set! conceal ""))
|
||||
|
||||
(tag
|
||||
text: (_) @label)
|
||||
|
||||
(taglink
|
||||
"|" @markup.link
|
||||
(#set! conceal "")
|
||||
(#set! conceal ""))
|
||||
|
||||
(taglink
|
||||
text: (_) @markup.link)
|
||||
|
||||
(optionlink
|
||||
|
|
@ -25,7 +29,9 @@
|
|||
|
||||
(codespan
|
||||
"`" @markup.raw
|
||||
(#set! conceal "")
|
||||
(#set! conceal ""))
|
||||
|
||||
(codespan
|
||||
text: (_) @markup.raw)
|
||||
|
||||
((codeblock) @markup.raw.block
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue