commit:     dc914aa7dd15b5e7d2779a281ac02692061b6f07
Author:     Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Wed Jul 13 01:05:01 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Jul 13 05:21:28 2022 +0000
URL:        https://gitweb.gentoo.org/proj/gentoo-syntax.git/commit/?id=dc914aa7

syntax/ebuild: update eclassdoc syntax

* rename ECLASS-VARIABLE to ECLASS_VARIABLE
* highlight tags that don't take a value

Signed-off-by: Anna Vyalkova <cyber+gentoo <AT> sysrq.in>
Closes: https://github.com/gentoo/gentoo-syntax/pull/48
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 syntax/ebuild.vim | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/syntax/ebuild.vim b/syntax/ebuild.vim
index 7578ee6..85468c9 100644
--- a/syntax/ebuild.vim
+++ b/syntax/ebuild.vim
@@ -267,10 +267,12 @@ syn match EbuildExportFunctionsFunc contained 
/\S\+\(\s\|$\)\@=/ skipwhite nextg
 syn match EbuildExportFunctionsFuncE contained 
/\S\+\(\s\|$\)\@=\(\${\S\+}\|pkg_pretend\|pkg_nofetch\|pkg_setup\|src_unpack\|src_prepare\|src_configure\|src_compile\|src_test\|src_install\|pkg_preinst\|pkg_postinst\|pkg_prerm\|pkg_postrm\|pkg_config\|pkg_info\)\@<!/
 skipwhite nextgroup=EbuildExportFunctionsFunc,EbuildExportFunctionsFuncE
 
 " Eclass documentation
-syn match EclassDocumentation 
/@\(AUTHOR\|BLURB\|BUGREPORTS\|CODE\|DEAD\|DEPRECATED\|DESCRIPTION\|DEFAULT_UNSET\|ECLASS-VARIABLE\|ECLASS\|EXAMPLE\|FUNCTION\|INCLUDES_EPREFIX\|INTERNAL\|MAINTAINER\|OUTPUT_VARIABLE\|PRE_INHERIT\|PROVIDES\|RETURN\|REQUIRED\|SUBSECTION\|SUPPORTED_EAPIS\|USAGE\|USER_VARIABLE\|VARIABLE\|VCSURL\):/
 contained
+syn match   EclassDocumentationTag 
/@\(DEAD\|DEFAULT_UNSET\|INCLUDES_EPREFIX\|INTERNAL\|OUTPUT_VARIABLE\|PRE_INHERIT\|REQUIRED\|USER_VARIABLE\)$/
 contained
+syn match   EclassDocumentationTagAndColon 
/@\(AUTHOR\|BLURB\|BUGREPORTS\|CODE\|DEPRECATED\|DESCRIPTION\|ECLASS_VARIABLE\|ECLASS\|EXAMPLE\|FUNCTION\|MAINTAINER\|PROVIDES\|RETURN\|SUBSECTION\|SUPPORTED_EAPIS\|USAGE\|VARIABLE\|VCSURL\):/
 contained
+syn cluster EclassDocumentation 
contains=EclassDocumentationTag,EclassDocumentationTagAndColon
 " use shComment (sh.vim), make it compatible with other comment highlights
-syn match      shComment        "^\s*\zs#.*$"   contains=EclassDocumentation
-syn match      shComment        "\s\zs#.*$"     contains=EclassDocumentation
+syn match      shComment        "^\s*\zs#.*$"   contains=@EclassDocumentation
+syn match      shComment        "\s\zs#.*$"     contains=@EclassDocumentation
 
 " mistakes: misspelling
 syn keyword EbuildError LICENCE
@@ -371,7 +373,8 @@ hi def link EbuildUnpackerKeyword            Identifier
 hi def link EbuildUserKeyword                Identifier
 hi def link EbuildDistutilsFunction          Special
 
-hi def link EclassDocumentation              Identifier
+hi def link EclassDocumentationTag           Identifier
+hi def link EclassDocumentationTagAndColon   Identifier
 
 hi def link EbuildHomePageError              Error
 hi def link EbuildError                      Error

Reply via email to