~kota/wiki-ft.vim

864d6717a6bba09e2e8e536abcaab53475716b2d — Karl Yngve Lervåg 6 months ago 045622f
feat: support bracketed urls
1 files changed, 4 insertions(+), 0 deletions(-)

M syntax/wiki.vim
M syntax/wiki.vim => syntax/wiki.vim +4 -0
@@ 68,6 68,10 @@ for [s:group, s:type; s:contained] in [
        \ . (empty(s:contained) ? '' : ',' . join(s:contained, ','))
endfor

" Proper matching of bracketed urls
syntax match wikiLinkUrl "<\l\+:\%(\/\/\)\?[^>]\+>"
      \ display contains=@NoSpell,wikiConcealLink

syntax match wikiConcealLinkUrl
      \ `\%(///\=[^/ \t]\+/\)\zs\S\+\ze\%([/#?]\w\|\S\{15}\)`
      \ cchar=~ contained transparent contains=NONE conceal