From 5093f38c9fed9fae04234035ea253862ba8375ef Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Tue, 22 Nov 2022 13:50:50 +0100 Subject: feat(help): highlighted codeblocks --- runtime/syntax/help.vim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'runtime/syntax') diff --git a/runtime/syntax/help.vim b/runtime/syntax/help.vim index 181fed8708..c026c41799 100644 --- a/runtime/syntax/help.vim +++ b/runtime/syntax/help.vim @@ -14,10 +14,11 @@ set cpo&vim syn match helpHeadline "^[A-Z.][-A-Z0-9 .,()_']*?\=\ze\(\s\+\*\|$\)" syn match helpSectionDelim "^===.*===$" syn match helpSectionDelim "^---.*--$" +" Neovim: support language annotation in codeblocks if has("conceal") - syn region helpExample matchgroup=helpIgnore start=" >$" start="^>$" end="^[^ \t]"me=e-1 end="^<" concealends + syn region helpExample matchgroup=helpIgnore start=" >[a-z0-9]*$" start="^[a-z0-9]*>$" end="^[^ \t]"me=e-1 end="^<" concealends else - syn region helpExample matchgroup=helpIgnore start=" >$" start="^>$" end="^[^ \t]"me=e-1 end="^<" + syn region helpExample matchgroup=helpIgnore start=" >[a-z0-9]*$" start="^[a-z0-9]*>$" end="^[^ \t]"me=e-1 end="^<" endif syn match helpHyperTextJump "\\\@