Merge remote-tracking branch 'tmccombs/asciidoc-comments'

This commit is contained in:
Maxime Coste 2020-07-30 21:22:17 +10:00
commit 76f1b7a5f9
2 changed files with 6 additions and 2 deletions

View File

@ -33,6 +33,9 @@ add-highlighter shared/asciidoc/ regex (\A|\n\n)[^\n]+\n\^{2,}\h*$ 0:header
add-highlighter shared/asciidoc/ regex (\A|\n\n)=\h+[^\n]+$ 0:title
add-highlighter shared/asciidoc/ regex (\A|\n\n)={2,}\h+[^\n]+$ 0:header
add-highlighter shared/asciidoc/ regex ^//(?:[^\n/][^\n]*|)$ 0:comment
add-highlighter shared/asciidoc/ regex ^(/{4,}).*?\n(/{4,})$ 0:comment
add-highlighter shared/asciidoc/ regex ^\h*(?<bullet>[-\*])\h+[^\n]+$ 0:list bullet:bullet
add-highlighter shared/asciidoc/ regex ^\h*(?<bullet>[-\*]+)\h+[^\n]+(\n\h+[^-\*\n]*)?$ 0:list bullet:bullet
add-highlighter shared/asciidoc/ regex ^(-{3,})\n[^\n\h].*?\n(-{3,})$ 0:block

View File

@ -10,8 +10,9 @@ declare-option -docstring "characters inserted after a commented block" \
# Default comments for all languages
hook global BufSetOption filetype=asciidoc %{
set-option buffer comment_block_begin '///'
set-option buffer comment_block_end '///'
set-option buffer comment_line '//'
set-option buffer comment_block_begin '////'
set-option buffer comment_block_end '////'
}
hook global BufSetOption filetype=(c|cpp|dart|gluon|go|java|javascript|objc|php|rust|sass|scala|scss|swift|typescript) %{