blob: 379cab942c3c5de197ec816b581e6d5c42038c4b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-- Custom syntax for markdown filetype
-- Last Changed: 2022-10-21
-- Author: Federico Igne <git@federicoigne.com>
-- License: This file is placed in the public domain.
--- Conceal links
--
-- This overrides the similar commands in $VIMRUNTIME/syntax/markdown.vim
-- by adding `conceal{,ends}` to `markdownLink{,Text}` at the end of the
-- command.
vim.cmd([[
syn region markdownLinkText matchgroup=markdownLinkTextDelimiter start="!\=\[\%(\%(\_[^][]\|\[\_[^][]*\]\)*]\%( \=[[(]\)\)\@=" end="\]\%( \=[[(]\)\@=" nextgroup=markdownLink,markdownId skipwhite contains=@markdownInline,markdownLineStart concealends
syn region markdownLink matchgroup=markdownLinkDelimiter start="(" end=")" contains=markdownUrl keepend contained conceal
]])
|