aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna Vyalkova <cyber+gentoo@sysrq.in>2022-07-13 06:05:01 +0500
committerMichał Górny <mgorny@gentoo.org>2022-07-13 07:21:28 +0200
commitdc914aa7dd15b5e7d2779a281ac02692061b6f07 (patch)
tree77bdf5ccf0e84a4990c71aff13212f64e9c959cc
parentmake.conf: add loong/~loong to recognized keywords (diff)
downloadgentoo-syntax-dc914aa7dd15b5e7d2779a281ac02692061b6f07.tar.gz
gentoo-syntax-dc914aa7dd15b5e7d2779a281ac02692061b6f07.tar.bz2
gentoo-syntax-dc914aa7dd15b5e7d2779a281ac02692061b6f07.zip
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@sysrq.in> Closes: https://github.com/gentoo/gentoo-syntax/pull/48 Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r--syntax/ebuild.vim11
1 files 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