Add comment highlighting and options for asciidoc.

Fixes #3068.
This commit is contained in:
Thayne McCombs 2020-06-02 02:50:13 -06:00
parent e509a8e9cd
commit 881c7b9f15
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+([-\*])\h+[^\n]*(\n\h+[^-\*]\S+[^\n]*)*$ 0:list 1:bullet
add-highlighter shared/asciidoc/ regex ^(-{3,})\n[^\n\h].*?\n(-{3,})$ 0:block
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) %{