blob: 4be759580761d4cbcc0b947f526a61968a6d53ea (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
" Vim syntax file
" Language: Markdown-like LSP docstrings
" Maintainer: https://github.com/neovim/neovim
" URL: http://neovim.io
" Remark: Uses markdown syntax file
" Source the default Nvim markdown syntax, not other random ones.
execute 'source' expand('<sfile>:p:h') .. '/markdown.vim'
syn cluster mkdNonListItem add=mkdEscape,mkdNbsp
" Don't highlight invalid markdown syntax in LSP docstrings.
syn clear markdownError
syn clear markdownEscape
syntax region markdownEscape matchgroup=markdownEscape start=/\\\ze[\\\x60*{}\[\]()#+\-,.!_>~|"$%&'\/:;<=?@^ ]/ end=/./ containedin=ALL keepend oneline concealends
" Conceal backticks (which delimit code fragments).
" We ignore g:markdown_syntax_conceal here.
syn region markdownCode matchgroup=markdownCodeDelimiter start="`" end="`" keepend contains=markdownLineStart concealends
syn region markdownCode matchgroup=markdownCodeDelimiter start="`` \=" end=" \=``" keepend contains=markdownLineStart concealends
syn region markdownCode matchgroup=markdownCodeDelimiter start="^\s*````*.*$" end="^\s*````*\ze\s*$" keepend concealends
" Highlight code fragments.
hi def link markdownCode Special
" Conceal HTML entities.
syntax match mkdNbsp / / conceal cchar=
syntax match mkdLt /</ conceal cchar=<
syntax match mkdGt />/ conceal cchar=>
syntax match mkdAmp /&/ conceal cchar=&
syntax match mkdQuot /"/ conceal cchar="
hi def link mkdEscape Special
|