Update 2024-12-16 19:13 OpenBSD/amd64-t14
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
if exists('loaded_matchit')
|
||||
let b:match_words=''
|
||||
\.'\%({{<\s*\)\@<=\(\k\+\)\s\+.*>}}:'
|
||||
\.'\%({{<\s*\/\)\@<=\1\s*>}},'
|
||||
\.b:match_words
|
||||
endif
|
||||
37
.vim/pack/plugins/start/vim-hugo/after/syntax/markdown.vim
Normal file
37
.vim/pack/plugins/start/vim-hugo/after/syntax/markdown.vim
Normal file
@@ -0,0 +1,37 @@
|
||||
syn region markdownHugoShortcode start=/{{[<%]/ end=/[>%]}}/ matchgroup=Delimiter keepend
|
||||
|
||||
syn match markdownHugoShortcodeStartDelimiter /{{[<%]/ nextgroup=markdownHugoShortcodeName skipwhite contained containedin=markdownHugoShortcode
|
||||
hi link markdownHugoShortcodeStartDelimiter Delimiter
|
||||
|
||||
syn match markdownHugoShortcodeEndDelimiter /[>%]}}/ contained containedin=markdownHugoShortcode
|
||||
hi link markdownHugoShortcodeEndDelimiter Delimiter
|
||||
|
||||
syn match markdownHugoShortcodeName +/\=\k\++ contained containedin=markdownHugoShortcode
|
||||
hi link markdownHugoShortcodeName Statement
|
||||
|
||||
syn match markdownHugoShortcodeParam /\k\+\ze=\=/ contained containedin=markdownHugoShortcode
|
||||
hi link markdownHugoShortcodeParam Type
|
||||
|
||||
syn region markdownHugoShortcodeString start=/\z([`"]\)/ end=/\z1/ matchgroup=String contained containedin=markdownHugoShortcode
|
||||
hi link markdownHugoShortcodeString String
|
||||
|
||||
syn region markdownHugoShortcodeHighlight
|
||||
\ start='^{{[<%]\s\+highlight.*[>%]}}'ms=s-1
|
||||
\ end='^{{[<%]\s\+\/highlight\s\+[>%]}}'ms=s-1
|
||||
\ keepend
|
||||
\ contains=markdownHugoShortcode,markdownCode
|
||||
|
||||
" [js=javascript, python, r] -> [javascript, python, r]
|
||||
for s:lang in map(copy(get(g:,'markdown_fenced_languages',[])),'matchstr(v:val,"[^=]*$")')
|
||||
exe 'syn region markdownHugoShortcodeHighlight'.s:lang
|
||||
\.' start="^{{[%<]\s\+highlight\s\+'.s:lang.'\s\+.*[>%]}}"ms=s-1'
|
||||
\.' end="^{{[<%]\s\+\/highlight\s\+[>%]}}"ms=s-1'
|
||||
\.' keepend'
|
||||
\.' contains=markdownHugoShortcode,@markdownHighlight'.substitute(s:lang,'\.','','g')
|
||||
endfor
|
||||
|
||||
hi link markdownHugoShortcodeHighlight markdownCode
|
||||
|
||||
unlet! b:current_syntax
|
||||
syntax include @Yaml syntax/yaml.vim
|
||||
syntax region yamlFrontmatter start=/\%^---$/ end=/^---$/ keepend contains=@Yaml
|
||||
Reference in New Issue
Block a user