From 30599783642dca98668ca9dbf8812045b1c8f87a Mon Sep 17 00:00:00 2001 From: Everton Fraga Date: Fri, 13 Mar 2026 11:07:35 +0000 Subject: [PATCH] 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. --- syntax/solidity.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syntax/solidity.vim b/syntax/solidity.vim index 9a1ffea..198390f 100644 --- a/syntax/solidity.vim +++ b/syntax/solidity.vim @@ -165,7 +165,7 @@ hi def link solEventArgSpecial Label " Comment syn keyword solCommentTodo TODO FIXME XXX TBD contained -syn match solNatSpec contained /@title\|@author\|@notice\|@dev\|@param\|@inheritdoc\|@return/ +syn match solNatSpec contained /@title\|@author\|@notice\|@dev\|@param\|@inheritdoc\|@return\|@custom:\w\+/ syn region solLineComment start=+\/\/+ end=+$+ contains=solCommentTodo,solNatSpec,@Spell syn region solLineComment start=+^\s*\/\/+ skip=+\n\s*\/\/+ end=+$+ contains=solCommentTodo,solNatSpec,@Spell fold syn region solComment start="/\*" end="\*/" contains=solCommentTodo,solNatSpec,@Spell fold