Skip to content

Commit 7c2a8c4

Browse files
committed
vim: add rustCommentDoc
1 parent 38fe5aa commit 7c2a8c4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/etc/vim/syntax/rust.vim

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,11 @@ syn match rustFloat display "\<[0-9][0-9_]*\.[0-9_]\+\%([eE][+-]\=[0-9
110110
syn match rustLifetime display "\'\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*"
111111
syn match rustCharacter "'\([^'\\]\|\\\(['nrt\\\"]\|x\x\{2}\|u\x\{4}\|U\x\{8}\)\)'"
112112

113-
syn region rustComment start="/\*" end="\*/" contains=rustTodo
114-
syn region rustComment start="//" skip="\\$" end="$" contains=rustTodo keepend
113+
syn region rustCommentDoc start="/\*\*" end="\*/"
114+
syn region rustCommentDoc start="///" skip="\\$" end="$" keepend
115+
syn match rustComment "/\*\*/"
116+
syn region rustComment start="/\*[^\*]" end="\*/" contains=rustTodo
117+
syn region rustComment start="//[^/]" skip="\\$" end="$" contains=rustTodo keepend
115118

116119
syn keyword rustTodo contained TODO FIXME XXX NB
117120

@@ -134,6 +137,7 @@ hi def link rustConditional Conditional
134137
hi def link rustIdentifier Identifier
135138
hi def link rustModPath Include
136139
hi def link rustFuncName Function
140+
hi def link rustCommentDoc SpecialComment
137141
hi def link rustComment Comment
138142
hi def link rustMacro Macro
139143
hi def link rustType Type

0 commit comments

Comments
 (0)