Skip to content

Commit 3059978

Browse files
committed
Add @Custom:* NatSpec tag highlighting
Solidity supports @Custom: NatSpec tags (e.g. @Custom:oz-upgrades, @Custom:smtchecker) since v0.6.2. This adds them to the existing solNatSpec match pattern so they highlight consistently with @title, @author, @notice, etc.
1 parent a2c5e37 commit 3059978

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

syntax/solidity.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ hi def link solEventArgSpecial Label
165165

166166
" Comment
167167
syn keyword solCommentTodo TODO FIXME XXX TBD contained
168-
syn match solNatSpec contained /@title\|@author\|@notice\|@dev\|@param\|@inheritdoc\|@return/
168+
syn match solNatSpec contained /@title\|@author\|@notice\|@dev\|@param\|@inheritdoc\|@return\|@custom:\w\+/
169169
syn region solLineComment start=+\/\/+ end=+$+ contains=solCommentTodo,solNatSpec,@Spell
170170
syn region solLineComment start=+^\s*\/\/+ skip=+\n\s*\/\/+ end=+$+ contains=solCommentTodo,solNatSpec,@Spell fold
171171
syn region solComment start="/\*" end="\*/" contains=solCommentTodo,solNatSpec,@Spell fold

0 commit comments

Comments
 (0)