You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

38 lines
1.5 KiB

3 years ago
setlocal foldmethod=expr
setlocal foldexpr=notecrate#nested_markdown_folds(v:lnum)
setlocal foldtext=notecrate#fold_text()
3 years ago
setlocal conceallevel=2
set comments=b:*
setlocal nowrap
syn match NotecrateLinkInternal /\(\](\)\@<=[^()]*\()\)\@=/
syn match NotecrateLinkConceal /!*\[\+\([^\]]*](\)\@=/ conceal
syn match NotecrateLinkConceal /\]\+\((\)\@=/ conceal
syn match NotecrateLinkConceal /\(\[[^\]]*\]\)\@<=([^)]*)/ conceal contains=NotecrateLinkInternal
syn match NotecrateLink /\(\[\)\@<=[^\[\]]*\(\](\)\@=/
syn match NotecrateLinkImage /\(!\[\+\)\@<=[^\[\]]*\(\]\+\)\@=/
syn match NotecrateHeader1 /\(^# \)\@<=.*/
syn match NotecrateHeader2 /\(^##\+ \)\@<=.*/
syn match NotecrateRule /^---\+/
syn region NotecrateFrontCustomMatter start=/\%^---/ end=/^---/
syn region NotecrateCode start=/^```/ end=/^```/
" syn match NotecrateBoldConceal /\*\*/ conceal containedin=ALL
syn match NotecrateBoldConceal /\*\*/ containedin=ALL
syn region NotecrateBold start=/\*\*/ end=/\*\*/ contains=NotecrateBoldConceal keepend
syn match NotecrateQuote /^>.*$/
syn match NotecrateTag /#[^# ]\S*/
hi def link NotecrateBold base2
hi def link NotecrateTag cyanu
hi def link NotecrateCode red
hi def link NotecrateFrontCustomMatter base01
hi def link NotecrateHeader1 base3u
hi def link NotecrateHeader2 base1u
hi def link NotecrateLink blueu
hi def link NotecrateLinkConceal blue
hi def link NotecrateLinkImage redu
hi def link NotecrateLinkInternal orangeu
hi def link NotecrateList base2
hi def link NotecrateQuote cyan
hi def link NotecrateRule base01