caio.co/de/vim-runtime

Highlight "TOML" front matter on markdown files

A bit iffy, just like the yaml version, but it works alright
Id
a98068aced543a6f7aed726752ce54eca5ea05ee
Author
Caio
Commit time
2020-12-05T11:38:03+01:00

Modified after/syntax/markdown.vim

@@ -1,6 +1,11
-" YAML Front Matter
-exe 'runtime! syntax/yaml.vim'
+" " YAML Front Matter
unlet! b:current_syntax
syn include @YamlTop syntax/yaml.vim
+syn region yamlHead start="\%^---$" end="^---\s*$" keepend contains=@YamlTop
+
+" Config/kinda-TOML Front Matter
unlet! b:current_syntax
-syn region yamlHead start="\%^---$" end="^---\s*$" keepend contains=@YamlTop,@Spell
+syn include @ConfigTop syntax/config.vim
+syn region Comment start="\%^+++$" end="^+++\s*$" keepend contains=@ConfigTop
+
+let b:current_syntax="markdown"