mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 11:20:07 -04:00
feat(markdown): set url attribute on plain URLs
Setting the url attribute on actual URLs will cause Nvim to use the OSC 8 sequence on the entire URL, which enables terminal emulators to detect the URL even when it is wrapped. The (uri_autolink) node must use an #offset! directive to strip the surrounding <> characters from the URL.
This commit is contained in:
parent
9d252d0021
commit
205102f372
1 changed files with 7 additions and 0 deletions
|
|
@ -88,6 +88,13 @@
|
||||||
(email_autolink)
|
(email_autolink)
|
||||||
] @markup.link.url @nospell
|
] @markup.link.url @nospell
|
||||||
|
|
||||||
|
((link_destination) @_url
|
||||||
|
(#set! @_url "url" @_url))
|
||||||
|
|
||||||
|
((uri_autolink) @_url
|
||||||
|
(#offset! @_url 0 1 0 -1)
|
||||||
|
(#set! @_url "url" @_url))
|
||||||
|
|
||||||
(entity_reference) @nospell
|
(entity_reference) @nospell
|
||||||
|
|
||||||
; Replace common HTML entities.
|
; Replace common HTML entities.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue