mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-13 05:53:50 -05:00
Update
This commit is contained in:
@@ -92,7 +92,7 @@ function! GetErubyIndent(...)
|
|||||||
if line =~# '^\s*<%[=#-]\=\s*$' && cline !~# '^\s*end\>'
|
if line =~# '^\s*<%[=#-]\=\s*$' && cline !~# '^\s*end\>'
|
||||||
let ind = ind + sw
|
let ind = ind + sw
|
||||||
endif
|
endif
|
||||||
if line !~# '^\s*<%' && line =~# '%>\s*$'
|
if line !~# '^\s*<%' && line =~# '%>\s*$' && line !~# '^\s*end\>'
|
||||||
let ind = ind - sw
|
let ind = ind - sw
|
||||||
endif
|
endif
|
||||||
if cline =~# '^\s*[-=]\=%>\s*$'
|
if cline =~# '^\s*[-=]\=%>\s*$'
|
||||||
|
|||||||
@@ -20,14 +20,20 @@ unlet! b:current_syntax
|
|||||||
if !exists('g:markdown_fenced_languages')
|
if !exists('g:markdown_fenced_languages')
|
||||||
let g:markdown_fenced_languages = []
|
let g:markdown_fenced_languages = []
|
||||||
endif
|
endif
|
||||||
|
let s:done_include = {}
|
||||||
for s:type in map(copy(g:markdown_fenced_languages),'matchstr(v:val,"[^=]*$")')
|
for s:type in map(copy(g:markdown_fenced_languages),'matchstr(v:val,"[^=]*$")')
|
||||||
|
if has_key(s:done_include, matchstr(s:type,'[^.]*'))
|
||||||
|
continue
|
||||||
|
endif
|
||||||
if s:type =~ '\.'
|
if s:type =~ '\.'
|
||||||
let b:{matchstr(s:type,'[^.]*')}_subtype = matchstr(s:type,'\.\zs.*')
|
let b:{matchstr(s:type,'[^.]*')}_subtype = matchstr(s:type,'\.\zs.*')
|
||||||
endif
|
endif
|
||||||
exe 'syn include @markdownHighlight'.substitute(s:type,'\.','','g').' syntax/'.matchstr(s:type,'[^.]*').'.vim'
|
exe 'syn include @markdownHighlight'.substitute(s:type,'\.','','g').' syntax/'.matchstr(s:type,'[^.]*').'.vim'
|
||||||
unlet! b:current_syntax
|
unlet! b:current_syntax
|
||||||
|
let s:done_include[matchstr(s:type,'[^.]*')] = 1
|
||||||
endfor
|
endfor
|
||||||
unlet! s:type
|
unlet! s:type
|
||||||
|
unlet! s:done_include
|
||||||
|
|
||||||
syn sync minlines=10
|
syn sync minlines=10
|
||||||
syn case ignore
|
syn case ignore
|
||||||
@@ -93,10 +99,16 @@ syn match markdownFootnote "\[^[^\]]\+\]"
|
|||||||
syn match markdownFootnoteDefinition "^\[^[^\]]\+\]:"
|
syn match markdownFootnoteDefinition "^\[^[^\]]\+\]:"
|
||||||
|
|
||||||
if main_syntax ==# 'markdown'
|
if main_syntax ==# 'markdown'
|
||||||
|
let s:done_include = {}
|
||||||
for s:type in g:markdown_fenced_languages
|
for s:type in g:markdown_fenced_languages
|
||||||
|
if has_key(s:done_include, matchstr(s:type,'[^.]*'))
|
||||||
|
continue
|
||||||
|
endif
|
||||||
exe 'syn region markdownHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\..*','','').' matchgroup=markdownCodeDelimiter start="^\s*```*\s*'.matchstr(s:type,'[^=]*').'\>.*$" end="^\s*```*\ze\s*$" keepend contains=@markdownHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\.','','g')
|
exe 'syn region markdownHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\..*','','').' matchgroup=markdownCodeDelimiter start="^\s*```*\s*'.matchstr(s:type,'[^=]*').'\>.*$" end="^\s*```*\ze\s*$" keepend contains=@markdownHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\.','','g')
|
||||||
|
let s:done_include[matchstr(s:type,'[^.]*')] = 1
|
||||||
endfor
|
endfor
|
||||||
unlet! s:type
|
unlet! s:type
|
||||||
|
unlet! s:done_include
|
||||||
endif
|
endif
|
||||||
|
|
||||||
syn match markdownEscape "\\[][\\`*_{}()<>#+.!-]"
|
syn match markdownEscape "\\[][\\`*_{}()<>#+.!-]"
|
||||||
|
|||||||
Reference in New Issue
Block a user