1
0
Fork 0

Compare commits

...

3 Commits

Author SHA1 Message Date
urosm 039f53c2e5 update `mimeapps.list` 2024-02-14 15:32:47 +01:00
urosm c5d8e6610e update `nvim` config 2024-02-14 15:32:19 +01:00
urosm e78346e326 update `nvim` config
markdown syntax checkpoint
2024-02-14 15:13:12 +01:00
3 changed files with 40 additions and 196 deletions

View File

@ -3,3 +3,5 @@ text/plain=nvim.desktop;
text/markdown=nvim.desktop;
application/pdf=org.pwmt.zathura.desktop;
inode/directory=footclient-directory.desktop;
x-scheme-handler/http=firefox.desktop;
x-scheme-handler/https=firefox.desktop;

View File

@ -277,6 +277,7 @@ local syntax_warn_h = H:new():fg(black_c):bg(orange_c)
local syntax_italic_h = H:new():attr("italic")
local syntax_bold_h = H:new():attr("bold")
local syntax_bolditalic_h = H:new():attr("bold"):attr("italic")
local syntax_strike_h = H:new():attr("strikethrough")
set_hl("Comment", syntax_comment_h)
set_hl("Constant", syntax_constant_h)
@ -317,6 +318,7 @@ set_hl("Todo", syntax_warn_h)
set_hl("Italic", syntax_italic_h)
set_hl("Bold", syntax_bold_h)
set_hl("BoldItalic", syntax_bolditalic_h)
set_hl("Strike", syntax_strike_h)
-- markdown --------------------------------------------------------------------
local markdown_label_h = H:new():fg(magenta_c)

View File

@ -1,231 +1,71 @@
" Vim syntax file
" Language: Markdown
" Maintainer: urosm <urosm@kompot.si>
" Last Change: 2024 Jan 13
" Last Change: 2024 Feb 14
if exists("b:current_syntax")
finish
endif
runtime! syntax/html.vim
unlet! b:current_syntax
syntax spell toplevel
" block formatting """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" setext heading
syn match markdownSetexHeading /\%(\%^\|\_^\n\).\+\n[=-]\+\n$/ contains=@markdownInline,markdownSetextHeadingDelimiter,markdownHeadingAttribute
hi def link markdownSetexHeading markdownTitle
syn match markdownSetextHeadingDelimiter /^[=-]\+$/ contained
hi def link markdownSetextHeadingDelimiter markdownDelimiter
" atx heading
syn match markdownAtxHeading /\%(\%^\|\_^\n\)#\{1,6} .*\n$/ contains=@markdownInline,markdownAtxHeadingDelimiter,markdownHeadingAttribute
hi def link markdownAtxHeading markdownTitle
syn match markdownAtxHeadingDelimiter /^#\{1,6}/ contained
hi def link markdownAtxHeadingDelimiter markdownDelimiter
syn match markdownHeadingAttribute /.*\zs{.\{-}}$/ contained
hi def link markdownHeadingAttribute markdownDelimiter
" titleblock
syn region markdownTitleBlock start=/\%^%/ end=/\n$/ contains=@markdownInline,markdownTitleBlockDelimiter
hi def link markdownTitleBlock markdownTitle
syn match markdownTitleBlockDelimiter /%\ / contained
hi def link markdownTitleBlockDelimiter markdownDelimiter
" horizontal rule
syn match markdownHRule /^\n\s*\*\s*\(\*\s*\)\{2,}\n$/ display
syn match markdownHRule /^\n\s*\-\s*\(\-\s*\)\{2,}\n$/ display
syn match markdownHRule /^\n\s*_\s*\(_\s*\)\{2,}\n$/ display
hi def link markdownHRule markdownDelimiter
" inline formatting """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" emphasis
syn region markdownItalic matchgroup=markdownDelimiter start=/\\\@1<!\(\_^\|\s\|[[:punct:]]\)\@<=\*\S\@=/ skip=/\(\*\*\|__\)/ end=/\*\([[:punct:]]\|\s\|\_$\)\@=/ contains=@Spell,markdownNoFormattedInEmphasis,markdownLatexInlineMath,markdownAmpersandEscape
syn region markdownItalic matchgroup=markdownDelimiter start=/\\\@1<!\(\_^\|\s\|[[:punct:]]\)\@<=_\S\@=/ skip=/\(\*\*\|__\)/ end=/\S\@1<=_\([[:punct:]]\|\s\|\_$\)\@=/ contains=@Spell,markdownNoFormattedInEmphasis,markdownLatexInlineMath,markdownAmpersandEscape
hi def link markdownItalic htmlItalic
syn region markdownItalic matchgroup=markdownDelimiter start=/\\\@1<!\(\_^\|\s\|[[:punct:]]\)\@<=\*\S\@=/ skip=/\(\*\*\|__\)/ end=/\*\([[:punct:]]\|\s\|\_$\)\@=/ contains=@Spell
syn region markdownItalic matchgroup=markdownDelimiter start=/\\\@1<!\(\_^\|\s\|[[:punct:]]\)\@<=_\S\@=/ skip=/\(\*\*\|__\)/ end=/\S\@1<=_\([[:punct:]]\|\s\|\_$\)\@=/ contains=@Spell
" bold
syn region markdownBold matchgroup=markdownDelimiter start=/\(\\\@<!\*\)\{2}/ end=/\(\\\@<!\*\)\{2}/ contains=@Spell,markdownNoFormattedInStrong,markdownLatexInlineMath,markdownAmpersandEscape
syn region markdownBold matchgroup=markdownDelimiter start=/__/ end=/__/ contains=@Spell,markdownNoFormattedInStrong,markdownLatexInlineMath,markdownAmpersandEscape
hi def link markdownBold htmlBold
syn region markdownBold matchgroup=markdownDelimiter start=/\(\\\@<!\*\)\{2}/ end=/\(\\\@<!\*\)\{2}/ contains=@Spell
syn region markdownBold matchgroup=markdownDelimiter start=/__/ end=/__/ contains=@Spell
" bold italic
syn region markdownBoldItalic matchgroup=markdownDelimiter start=/\*\{3}\(\S[^*]*\(\*\S\|\n[^*]*\*\S\)\)\@=/ end=/\S\@<=\*\{3}/ contains=@Spell,markdownAmpersandEscape
syn region markdownBoldItalic matchgroup=markdownDelimiter start=/\(___\)\S\@=/ end=/\S\@<=___/ contains=@Spell,markdownAmpersandEscape
hi def link markdownBoldItalic htmlBoldItalic
syn region markdownBoldInItalic matchgroup=markdownDelimiter start=/\*\*/ end=/\*\*/ contained containedin=markdownItalic contains=@Spell,markdownAmpersandEscape
syn region markdownBoldInItalic matchgroup=markdownDelimiter start=/__/ end=/__/ contained containedin=markdownItalic contains=@Spell,markdownAmpersandEscape
syn region markdownItalicInBold matchgroup=markdownDelimiter start=/\\\@1<!\(\_^\|\s\|[[:punct:]]\)\@<=\*\S\@=/ skip=/\(\*\*\|__\)/ end=/\S\@<=\*\([[:punct:]]\|\s\|\_$\)\@=/ contained containedin=markdownBold contains=@Spell,markdownAmpersandEscape
syn region markdownItalicInBold matchgroup=markdownDelimiter start=/\\\@<!\(\_^\|\s\|[[:punct:]]\)\@<=_\S\@=/ skip=/\(\*\*\|__\)/ end=/\S\@<=_\([[:punct:]]\|\s\|\_$\)\@=/ contained containedin=markdownBold contains=@Spell,markdownAmpersandEscape
syn region markdownBoldItalic matchgroup=markdownDelimiter start=/\*\{3}\(\S[^*]*\(\*\S\|\n[^*]*\*\S\)\)\@=/ end=/\S\@<=\*\{3}/ contains=@Spell
syn region markdownBoldItalic matchgroup=markdownDelimiter start=/\(___\)\S\@=/ end=/\S\@<=___/ contains=@Spell
syn region markdownBoldInItalic matchgroup=markdownDelimiter start=/\*\*/ end=/\*\*/ contained containedin=markdownItalic contains=@Spell
syn region markdownBoldInItalic matchgroup=markdownDelimiter start=/__/ end=/__/ contained containedin=markdownItalic contains=@Spell
hi def link markdownBoldInItalic markdownBoldItalic
syn region markdownItalicInBold matchgroup=markdownDelimiter start=/\\\@1<!\(\_^\|\s\|[[:punct:]]\)\@<=\*\S\@=/ skip=/\(\*\*\|__\)/ end=/\S\@<=\*\([[:punct:]]\|\s\|\_$\)\@=/ contained containedin=markdownBold contains=@Spell
syn region markdownItalicInBold matchgroup=markdownDelimiter start=/\\\@<!\(\_^\|\s\|[[:punct:]]\)\@<=_\S\@=/ skip=/\(\*\*\|__\)/ end=/\S\@<=_\([[:punct:]]\|\s\|\_$\)\@=/ contained containedin=markdownBold contains=@Spell
hi def link markdownItalicInBold markdownBoldItalic
" link
syn match markdownLink /!\=\[\_.\{-}\](\_.\{-})/ contains=markdownLinkLabel
hi def link markdownLink markdownUnderlined
syn match markdownLinkLabel /\[\@1<=[^\]]\+/ contained contains=@markdownInline
syn match markdownLink /!\=\[\_.\{-}\](\_.\{-})/ contains=markdownLinkLabel,markdownLinkURL
syn match markdownLinkLabel /\[\zs.*\ze\]/ contained
hi def link markdownLinkLabel markdownLabel
syn match markdownLinkURL /.*(\zs.*\ze)/ contained
hi def link markdownLinkURL markdownUnderlined
" automatic link
syn match markdownAutomaticLink /<\(https\{0,1}.\{-}\|[A-Za-z0-9!#$%&'*+\-/=?^_`{|}~.]\{-}@[A-Za-z0-9\-]\{-}\.\w\{-}\)>/ contains=NONE
syn match markdownAutomaticLink /<\(https\{0,1}.\{-}\|[A-Za-z0-9!#$%&'*+\-/=?^_`{|}~.]\{-}@[A-Za-z0-9\-]\{-}\.\w\{-}\)>/
hi def link markdownAutomaticLink markdownUnderlined
" wikilink
syn match markdownWikilink /\[\[.*\]\]/ contains=markdownWikilinkLabel
hi def link markdownWikilink markdownUnderlined
syn region markdownWikilink start=/\[\[/ end=/\]\]/ contains=markdownWikilinkLabel,markdownWikilinkURL keepend display
syn match markdownWikilinkLabel /\(\[\[\)\@2<=[^\|\[\]]\+/ contained
" NOTE: update to support newlines in titles
syn match markdownWikilink /\[\[.*\]\]/ contains=markdownWikilinkLabel,markdownWikilinkURL
syn match markdownWikilinkLabel /\[\[\zs.\{-}\ze|.*\]\]/ contained
hi def link markdownWikilinkLabel markdownLabel
syn match markdownWikilinkURL /|\@1<=[^\]]\+/ contained
syn match markdownWikilinkURL /\%(\[\[\||\)\zs[^|]*\ze\]\]/ contained
hi def link markdownWikilinkURL markdownUnderlined
" definition
syn region markdownReferenceDefinition start=/\[.\{-}\]:/ end=/\(\n\s*".*"$\|$\)/ keepend
hi def link markdownReferenceDefinition markdownDelimiter
syn match markdownReferenceDefinitionLabel /\[\zs.\{-}\ze\]:/ contained containedin=markdownReferenceDefinition display
hi def link markdownReferenceDefinitionLabel markdownLabel
syn match markdownReferenceDefinitionURL /:\s*\zs.*/ contained containedin=markdownReferenceDefinition
hi def link markdownReferenceDefinitionURL markdownUnderlined
syn match markdownReferenceDefinitionTitle /\s*".\{-}"/ contained containedin=markdownReferenceDefinition,markdownReferenceDefinitionURL contains=@Spell,markdownAmpersandEscape
hi def link markdownReferenceDefinitionTitle markdownTitle
" footnote reference
syn match markdownFootnoteReference /\[\zs\^.\{-}\ze\]/
hi def link markdownFootnoteReference markdownLabel
" citation
syn match markdownPCite "\^\@<!\[[^\[\]]\{-}-\{0,1}@[[:alnum:]_][[:digit:][:lower:][:upper:]_:.#$%&\-+?<>~/]*.\{-}\]" contains=markdownItalic,markdownBold,markdownLatex,markdownCiteKey,@Spell,markdownAmpersandEscape
syn match markdownICite "@[[:alnum:]_][[:digit:][:lower:][:upper:]_:.#$%&\-+?<>~/]*\s\[.\{-1,}\]" contains=markdownCiteKey,@Spell display
syn match markdownCiteKey /\(-\=@[[:alnum:]_][[:digit:][:lower:][:upper:]_:.#$%&\-+?<>~/]*\)/ containedin=markdownPCite,markdownICite contains=@NoSpell display
hi def link markdownCiteKey markdownLabel
syn match markdownCiteLocator /[\[\]]/ contained containedin=markdownPCite,markdownICite
hi def link markdownCiteLocator markdownDelimiter
" strikeout
syn region markdownStrike start=/\~\~/ end=/\~\~/ contains=markdownStrikeout,@Spell keepend
hi def link markdownStrike htmlStrike
syn match markdownStrikeDelimiter /\~\~/ contained
hi def link markdownStrikeDelimiter markdownDelimiter
" subscript
syn region markdownSubscript start=/\~\(\([[:graph:]]\(\\ \)\=\)\{-}\~\)\@=/ end=/\~/ contains=markdownSubscriptDelimiter keepend
syn match markdownSubscriptDelimiter /\~/ contained
hi def link markdownSubscriptDelimiter markdownDelimiter
" superscript
syn region markdownSuperscript start=/\^\(\([[:graph:]]\(\\ \)\=\)\{-}\^\)\@=/ skip=/\\ / end=/\^/ contains=markdownSuperscriptDelimiter keepend
syn match markdownSuperscriptDelimiter /\^/ contained
hi def link markdownSuperscriptDelimiter markdownDelimiter
" line block
syn region markdownLineBlock start=/^|/ end=/\(^|\(.*\n|\@!\)\@=.*\)\@<=\n/ transparent
syn match markdownLineBlockDelimiter /^|/ contained containedin=markdownLineBlock
hi def link markdownLineBlockDelimiter markdownDelimiter
" simple table
syn region markdownSimpleTable start=/\%#=2\(^.*[[:graph:]].*\n\)\@<!\(^.*[[:graph:]].*\n\)\(-\{2,}\s*\)\+\n\n\@!/ end=/\n\n/ containedin=ALLBUT,markdownDelimitedCodeBlock,markdownDelimitedCodeBlockStart,markdownYAMLHeader keepend
syn match markdownSimpleTableDelims /\-/ contained containedin=markdownSimpleTable
syn match markdownSimpleTableHeader /\%#=2\(^.*[[:graph:]].*\n\)\@<!\(^.*[[:graph:]].*\n\)/ contained containedin=markdownSimpleTable
hi def link markdownSimpleTableDelims markdownDelimiter
hi def link markdownSimpleTableHeader markdownBold
syn region markdownTable start=/\%#=2^\(-\{2,}\s*\)\+\n\n\@!/ end=/\%#=2^\(-\{2,}\s*\)\+\n\n/ containedin=ALLBUT,markdownDelimitedCodeBlock,markdownYAMLHeader keepend
syn match markdownTableDelims /\-/ contained containedin=markdownTable
syn region markdownTableMultilineHeader start=/\%#=2\(^-\{2,}\n\)\@<=./ end=/\%#=2\n-\@=/ contained containedin=markdownTable
hi def link markdownTableMultilineHeader markdownBold
hi def link markdownTableDelims markdownDelimiter
" grid table
syn region markdownGridTable start=/\%#=2\n\@1<=+-/ end=/+\n\n/ containedin=ALLBUT,markdownDelimitedCodeBlock,markdownYAMLHeader keepend
syn match markdownGridTableDelims /[\|=]/ contained containedin=markdownGridTable
syn match markdownGridTableDelims /\%#=2\([\-+][\-+=]\@=\|[\-+=]\@1<=[\-+]\)/ contained containedin=markdownGridTable
syn match markdownGridTableHeader /\%#=2\(^.*\n\)\(+=.*\)\@=/ contained containedin=markdownGridTable
hi def link markdownGridTableDelims markdownDelimiter
hi def link markdownGridTableHeader markdownDelimiter
" pipe table
syn region markdownPipeTable start=/\%#=2\([+|]\n\)\@<!\n\@1<=|\(.*|\)\@=/ end=/|.*\n\(\n\|{\)/ containedin=ALLBUT,markdownDelimitedCodeBlock,markdownYAMLHeader keepend
syn region markdownPipeTable start=/\%#=2^.*\n-.\{-}|/ end=/|.*\n\n/ keepend
syn match markdownPipeTableDelims /[\|\-:+]/ contained containedin=markdownPipeTable
syn match markdownPipeTableHeader /\(^.*\n\)\(|-\)\@=/ contained containedin=markdownPipeTable
syn match markdownPipeTableHeader /\(^.*\n\)\(-\)\@=/ contained containedin=markdownPipeTable
hi def link markdownPipeTableDelims markdownDelimiter
hi def link markdownPipeTableHeader markdownDelimiter
syn match markdownTableHeaderWord /\<.\{-}\>/ contained containedin=markdownGridTableHeader,markdownPipeTableHeader contains=@Spell
hi def link markdownTableHeaderWord markdownBold
" delimited code blocks
syn region markdownDelimitedCodeBlock start=/^\(>\s\)\?\z(\([ ]\+\|\t\)\=\~\{3,}\~*\)/ end=/^\z1\~*/ skipnl contains=markdownDelimitedCodeBlockStart,markdownDelimitedCodeBlockEnd keepend
syn region markdownDelimitedCodeBlock start=/^\(>\s\)\?\z(\([ ]\+\|\t\)\=`\{3,}`*\)/ end=/^\z1`*/ skipnl contains=markdownDelimitedCodeBlockStart,markdownDelimitedCodeBlockEnd keepend
syn match markdownDelimitedCodeBlockStart /\(\(\_^\n\_^\|\%^\)\(>\s\)\?\( \+\|\t\)\=\)\@<=\(\~\{3,}\~*\|`\{3,}`*\)/ contained containedin=markdownDelimitedCodeBlock nextgroup=markdownDelimitedCodeBlockLanguage
syn match markdownDelimitedCodeBlockLanguage /\(\s\?\)\@<=.\+\(\_$\)\@=/ contained
syn match markdownDelimitedCodeBlockEnd /\(`\{3,}`*\|\~\{3,}\~*\)\(\_$\n\(>\s\)\?\_$\)\@=/ contained containedin=markdownDelimitedCodeBlock
syn match markdownBlockquoteinDelimitedCodeBlock '^>' contained containedin=markdownDelimitedCodeBlock
syn match markdownCodePre /<pre>.\{-}<\/pre>/ skipnl
syn match markdownCodePre /<code>.\{-}<\/code>/ skipnl
hi def link markdownDelimitedCodeBlock markdownSpecial
hi def link markdownDelimitedCodeBlockStart markdownDelimiter
hi def link markdownDelimitedCodeBlockEnd markdownDelimiter
hi def link markdownDelimitedCodeBlockLanguage markdownComment
hi def link markdownBlockquoteinDelimitedCodeBlock markdownBlockquote
hi def link markdownCodePre markdownString
" footnote
syn match markdownFootnoteID /\[\^[^\]]\+\]/ nextgroup=markdownFootnoteDef
hi def link markdownFootnoteID markdownLabel
" inline footnote
syn region markdownFootnoteDef start=/\^\[/ skip=/\[.\{-}]/ end=/\]/ contains=markdownLink,markdownLatex,markdownPCite,markdownCiteKey,markdownBold,markdownItalic,markdownBoldItalic,markdownNoFormatted,markdownSuperscript,markdownSubscript,markdownStrike,markdownEnDash,markdownEmDash,markdownEllipses,markdownBeginQuote,markdownEndQuote,@Spell,markdownAmpersandEscape skipnl keepend
hi def link markdownFootnoteDef markdownComment
syn match markdownFootnoteDefHead /\^\[/ contained containedin=markdownFootnoteDef
hi def link markdownFootnoteDefHead markdownDelimiter
syn match markdownFootnoteDefTail /\]/ contained containedin=markdownFootnoteDef
hi def link markdownFootnoteDefTail markdownDelimiter
" regular footnotes
syn region markdownFootnoteBlock start=/\[\^.\{-}\]:\s*\n*/ end=/^\n^\s\@!/ contains=markdownLink,markdownLatex,markdownPCite,markdownCiteKey,markdownBold,markdownItalic,markdownNoFormatted,markdownSuperscript,markdownSubscript,markdownStrike,markdownEnDash,markdownEmDash,markdownNewLine,markdownBoldItalic,markdownEllipses,markdownBeginQuote,markdownEndQuote,markdownLaTeXInlineMath,markdownEscapedDollar,markdownLaTeXCommand,markdownLaTeXMathBlock,markdownLaTeXRegion,markdownAmpersandEscape,@Spell skipnl
syn match markdownFootnoteBlockSeparator /:/ contained containedin=markdownFootnoteBlock
hi def link markdownFootnoteBlockSeparator markdownDelimiter
syn match markdownFootnoteID /\[\^.\{-}\]/ contained containedin=markdownFootnoteBlock
syn match markdownFootnoteIDHead /\[\^/ contained containedin=markdownFootnoteID
hi def link markdownFootnoteIDHead markdownDelimiter
syn match markdownFootnoteIDTail /\]/ contained containedin=markdownFootnoteID
hi def link markdownFootnoteIDTail markdownDelimiter
" unordered list
syn match markdownUListItem /^>\=\s*[*+-]\s\+-\@!.*$/ nextgroup=markdownUListItem,markdownLaTeXMathBlock,markdownLaTeXInlineMath,markdownEscapedDollar,markdownDelimitedCodeBlock,markdownListItemContinuation contains=@Spell,markdownItalic,markdownBold,markdownNoFormatted,markdownStrike,markdownSubscript,markdownSuperscript,markdownBoldItalic,markdownBoldItalic,markdownPCite,markdownICite,markdownCiteKey,markdownLinkText,markdownLaTeXCommand,markdownLaTeXMathBlock,markdownLaTeXInlineMath,markdownEscapedDollar,markdownLinkURL,markdownAutomaticLink,markdownFootnoteDef,markdownFootnoteBlock,markdownFootnoteID,markdownAmpersandEscape skipempty display
syn match markdownUListItemBullet /^>\=\s*\zs[*+-]/ contained containedin=markdownUListItem
hi def link markdownUListItemBullet markdownOperator
" ordered list
syn match markdownListItem /^\s*(\?\(\d\+\|\l\|\#\|@\)[.)].*$/ nextgroup=markdownListItem,markdownLaTeXMathBlock,markdownLaTeXInlineMath,markdownEscapedDollar,markdownDelimitedCodeBlock,markdownListItemContinuation contains=@Spell,markdownItalic,markdownBold,markdownNoFormatted,markdownStrike,markdownSubscript,markdownSuperscript,markdownBoldItalic,markdownBoldItalic,markdownPCite,markdownICite,markdownCiteKey,markdownLinkText,markdownLaTeXCommand,markdownLaTeXMathBlock,markdownLaTeXInlineMath,markdownEscapedDollar,markdownAutomaticLink,markdownFootnoteDef,markdownFootnoteBlock,markdownFootnoteID,markdownAmpersandEscape skipempty display
syn match markdownListItem /^\s*(\?x\=l\=\(i\{,3}[vx]\=\)\{,3}c\{,3}[.)].*$/ nextgroup=markdownListItem,markdownMathBlock,markdownLaTeXInlineMath,markdownEscapedDollar,markdownDelimitedCodeBlock,markdownListItemContinuation,markdownAutomaticLink skipempty display
syn match markdownListItemBullet /^(\?.\{-}[.)]/ contained containedin=markdownListItem
syn match markdownListItemBulletId /\(\d\+\|\l\|\#\|@.\{-}\|x\=l\=\(i\{,3}[vx]\=\)\{,3}c\{,3}\)/ contained containedin=markdownListItemBullet
hi def link markdownListItemBullet markdownOperator
hi def link markdownListItemBulletId markdownIdentifier
syn match markdownListItemContinuation /^\s\+\([-+*]\s\+\|(\?.\+[).]\)\@<!\([[:upper:][:lower:]_"[]\|\*\S\)\@=.*$/ nextgroup=markdownLaTeXMathBlock,markdownLaTeXInlineMath,markdownEscapedDollar,markdownDelimitedCodeBlock,markdownListItemContinuation,markdownListItem contains=@Spell,markdownItalic,markdownBold,markdownNoFormatted,markdownStrike,markdownSubscript,markdownSuperscript,markdownBoldItalic,markdownBoldItalic,markdownPCite,markdownICite,markdownCiteKey,markdownLink,markdownLaTeXCommand,markdownLaTeXMathBlock,markdownLaTeXInlineMath,markdownEscapedDollar,markdownAutomaticLink,markdownFootnoteDef,markdownFootnoteBlock,markdownFootnoteID,markdownAmpersandEscape contained skipempty display
" definition list
syn region markdownDefinitionBlock start=/^\%(\_^\s*\([`~]\)\1\{2,}\)\@!.*\n\(^\s*\n\)\=\s\{0,2}\([:~]\)\(\3\{2,}\3*\)\@!/ skip=/\n\n\zs\s/ end=/\n\n/ contains=markdownDefinitionBlockDelimiter,markdownDefinitionBlockTerm,markdownCodeBlockInsideIndent,markdownItalic,markdownBold,markdownBoldItalic,markdownNoFormatted,markdownStrike,markdownSubscript,markdownSuperscript,markdownFootnoteID,markdownLinkURL,markdownLinkText,markdownLaTeXMathBlock,markdownLaTeXInlineMath,markdownEscapedDollar,markdownAutomaticLink,markdownEmDash,markdownEnDash,markdownFootnoteDef,markdownFootnoteBlock,markdownFootnoteID
syn match markdownDefinitionBlockTerm /^.*\n\(^\s*\n\)\=\(\s*[:~]\)\@=/ contained contains=markdownNoFormatted,markdownItalic,markdownBold,markdownLaTeXInlineMath,markdownEscapedDollar,markdownFootnoteDef,markdownFootnoteBlock,markdownFootnoteID nextgroup=markdownDefinitionBlockDelimiter
syn match markdownDefinitionBlockDelimiter /^\s*[:~]/ contained
hi def link markdownDefinitionBlockTerm markdownIdentifier
hi def link markdownDefinitionBlockDelimiter markdownDelimiter
" new line
syn match markdownNewLine /\%(\%(\S\)\@<= \{2,}\|\\\)$/ display containedin=markdownItalic,markdownBold,markdownBoldItalic,markdownBoldInItalic,markdownItalicInBold
hi def link markdownNewLine markdownError
" reference key
syn match markdownReferenceKey /@[[:alnum:]_][[:digit:][:lower:][:upper:]_:.#$%&-+?<>~\/]*/
hi def link markdownReferenceKey markdownLabel
" html comment
syn region markdownHTMLcomment start=/<!--/ end=/-->/ keepend contains=@Spell
hi def link markdownHTMLcomment markdownComment
" yaml
syn include @YAML syntax/yaml.vim
unlet! b:current_syntax
syn region markdownYAMLHeader start=/\%(\%^\|\_^\s*\n\)\@<=\_^-\{3}\ze\n.\+/ end=/^\([-.]\)\1\{2}$/ keepend contains=@YAML containedin=TOP
" Styling
" styling
hi def link markdownComment Comment
hi def link markdownConstant Constant
hi def link markdownString String
@ -261,10 +101,10 @@ hi def link markdownUnderlined Underlined
hi def link markdownIgnore Ignore
hi def link markdownError Error
hi def link markdownItalic htmlItalic
hi def link markdownBold htmlBold
hi def link markdownItalicBold htmlItalicBold
hi def link markdownStrike htmlStrike
hi def link markdownItalic Italic
hi def link markdownBold Bold
hi def link markdownBoldItalic BoldItalic
hi def link markdownStrike Strike
hi def link markdownTitle Title
let b:current_syntax = "markdown"