neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

lsp_markdown.vim (1451B)


      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.
      8 execute 'source' expand('<sfile>:p:h') .. '/markdown.vim'
      9 
     10 syn cluster mkdNonListItem add=mkdEscape,mkdNbsp
     11 
     12 " Don't highlight invalid markdown syntax in LSP docstrings.
     13 syn clear markdownError
     14 
     15 syn clear markdownEscape
     16 syntax 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.
     20 syn region markdownCode matchgroup=markdownCodeDelimiter start="`" end="`" keepend contains=markdownLineStart concealends
     21 syn region markdownCode matchgroup=markdownCodeDelimiter start="`` \=" end=" \=``" keepend contains=markdownLineStart concealends
     22 syn region markdownCode matchgroup=markdownCodeDelimiter start="^\s*````*.*$" end="^\s*````*\ze\s*$" keepend concealends
     23 
     24 " Highlight code fragments.
     25 hi def link markdownCode Special
     26 
     27 " Conceal HTML entities.
     28 syntax match mkdNbsp /&nbsp;/ conceal cchar= 
     29 syntax match mkdLt /&lt;/  conceal cchar=<
     30 syntax match mkdGt /&gt;/  conceal cchar=>
     31 syntax match mkdAmp /&amp;/  conceal cchar=&
     32 syntax match mkdQuot /&quot;/  conceal cchar="
     33 
     34 hi def link mkdEscape Special