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