aboutsummaryrefslogtreecommitdiff
path: root/runtime/syntax
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2022-11-22 13:50:50 +0100
committerChristian Clason <c.clason@uni-graz.at>2022-11-29 13:32:46 +0100
commit5093f38c9fed9fae04234035ea253862ba8375ef (patch)
treef40dce86eb246c07698893df6af11f5dbb5ae1ef /runtime/syntax
parent89f0987bde8124f8fcbbcbf8320dbdabe0d69ba9 (diff)
downloadrneovim-5093f38c9fed9fae04234035ea253862ba8375ef.tar.gz
rneovim-5093f38c9fed9fae04234035ea253862ba8375ef.tar.bz2
rneovim-5093f38c9fed9fae04234035ea253862ba8375ef.zip
feat(help): highlighted codeblocks
Diffstat (limited to 'runtime/syntax')
-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