aboutsummaryrefslogtreecommitdiff
path: root/runtime/syntax/help.vim
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2022-12-02 16:45:39 +0100
committerGitHub <noreply@github.com>2022-12-02 16:45:39 +0100
commit07e6296520fc83b1fdb287b5173494cdd0e9136f (patch)
tree9844003e550f161a5d563a726fc759fa1a84d22a /runtime/syntax/help.vim
parent731432342058c1c4340fc3cc4782b5fcd4a756a0 (diff)
parente40df8b1bc6a7832c7707696b374b19642dfd596 (diff)
downloadrneovim-07e6296520fc83b1fdb287b5173494cdd0e9136f.tar.gz
rneovim-07e6296520fc83b1fdb287b5173494cdd0e9136f.tar.bz2
rneovim-07e6296520fc83b1fdb287b5173494cdd0e9136f.zip
Merge pull request #21154 from clason/vimdoc-injections
feat(help): highlighted codeblocks
Diffstat (limited to 'runtime/syntax/help.vim')
-rw-r--r--runtime/syntax/help.vim5
1 files changed, 3 insertions, 2 deletions
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 "\\\@<!|[#-)!+-~]\+|" contains=helpBar
syn match helpHyperTextEntry "\*[#-)!+-~]\+\*\s"he=e-1 contains=helpStar