diff options
author | Joshua Watt <JPEWhacker@gmail.com> | 2021-08-04 10:03:18 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-08-04 20:48:58 +0100 |
commit | 0b3be2821d740b9109c7b70cb7123764d80ef37b (patch) | |
tree | 70f9f7bad8540852e80e39024c846ec1591000b8 /bitbake | |
parent | 7171392132fb76b11b3fffea028e3f0bb1921dd3 (diff) | |
download | poky-0b3be2821d740b9109c7b70cb7123764d80ef37b.tar.gz |
bitbake: contrib: vim: Update for new override syntax
Updates the Vim syntax highlighting to account for the new override
syntax and also highlight "append" and "prepend" overrides
(Bitbake rev: 01a6322315a6ff6ab55a349f9fcd1e2d93448bfd)
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/contrib/vim/syntax/bitbake.vim | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/bitbake/contrib/vim/syntax/bitbake.vim b/bitbake/contrib/vim/syntax/bitbake.vim index f964621ae5..d8aa0f1ba1 100644 --- a/bitbake/contrib/vim/syntax/bitbake.vim +++ b/bitbake/contrib/vim/syntax/bitbake.vim | |||
@@ -51,9 +51,9 @@ syn region bbString matchgroup=bbQuote start=+'+ skip=+\\$+ end=+'+ | |||
51 | syn match bbExport "^export" nextgroup=bbIdentifier skipwhite | 51 | syn match bbExport "^export" nextgroup=bbIdentifier skipwhite |
52 | syn keyword bbExportFlag export contained nextgroup=bbIdentifier skipwhite | 52 | syn keyword bbExportFlag export contained nextgroup=bbIdentifier skipwhite |
53 | syn match bbIdentifier "[a-zA-Z0-9\-_\.\/\+]\+" display contained | 53 | syn match bbIdentifier "[a-zA-Z0-9\-_\.\/\+]\+" display contained |
54 | syn match bbVarDeref "${[a-zA-Z0-9\-_\.\/\+]\+}" contained | 54 | syn match bbVarDeref "${[a-zA-Z0-9\-_:\.\/\+]\+}" contained |
55 | syn match bbVarEq "\(:=\|+=\|=+\|\.=\|=\.\|?=\|??=\|=\)" contained nextgroup=bbVarValue | 55 | syn match bbVarEq "\(:=\|+=\|=+\|\.=\|=\.\|?=\|??=\|=\)" contained nextgroup=bbVarValue |
56 | syn match bbVarDef "^\(export\s*\)\?\([a-zA-Z0-9\-_\.\/\+]\+\(_[${}a-zA-Z0-9\-_\.\/\+]\+\)\?\)\s*\(:=\|+=\|=+\|\.=\|=\.\|?=\|??=\|=\)\@=" contains=bbExportFlag,bbIdentifier,bbVarDeref nextgroup=bbVarEq | 56 | syn match bbVarDef "^\(export\s*\)\?\([a-zA-Z0-9\-_\.\/\+][${}a-zA-Z0-9\-_:\.\/\+]*\)\s*\(:=\|+=\|=+\|\.=\|=\.\|?=\|??=\|=\)\@=" contains=bbExportFlag,bbIdentifier,bbOverrideOperator,bbVarDeref nextgroup=bbVarEq |
57 | syn match bbVarValue ".*$" contained contains=bbString,bbVarDeref,bbVarPyValue | 57 | syn match bbVarValue ".*$" contained contains=bbString,bbVarDeref,bbVarPyValue |
58 | syn region bbVarPyValue start=+${@+ skip=+\\$+ end=+}+ contained contains=@python | 58 | syn region bbVarPyValue start=+${@+ skip=+\\$+ end=+}+ contained contains=@python |
59 | 59 | ||
@@ -77,13 +77,15 @@ syn keyword bbOEFunctions do_fetch do_unpack do_patch do_configure do_comp | |||
77 | " Generic Functions | 77 | " Generic Functions |
78 | syn match bbFunction "\h[0-9A-Za-z_\-\.]*" display contained contains=bbOEFunctions | 78 | syn match bbFunction "\h[0-9A-Za-z_\-\.]*" display contained contains=bbOEFunctions |
79 | 79 | ||
80 | syn keyword bbOverrideOperator append prepend contained | ||
81 | |||
80 | " BitBake shell metadata | 82 | " BitBake shell metadata |
81 | syn include @shell syntax/sh.vim | 83 | syn include @shell syntax/sh.vim |
82 | if exists("b:current_syntax") | 84 | if exists("b:current_syntax") |
83 | unlet b:current_syntax | 85 | unlet b:current_syntax |
84 | endif | 86 | endif |
85 | syn keyword bbShFakeRootFlag fakeroot contained | 87 | syn keyword bbShFakeRootFlag fakeroot contained |
86 | syn match bbShFuncDef "^\(fakeroot\s*\)\?\([\.0-9A-Za-z_${}\-\.]\+\)\(python\)\@<!\(\s*()\s*\)\({\)\@=" contains=bbShFakeRootFlag,bbFunction,bbVarDeref,bbDelimiter nextgroup=bbShFuncRegion skipwhite | 88 | syn match bbShFuncDef "^\(fakeroot\s*\)\?\([\.0-9A-Za-z_:${}\-\.]\+\)\(python\)\@<!\(\s*()\s*\)\({\)\@=" contains=bbShFakeRootFlag,bbFunction,bbOverrideOperator,bbVarDeref,bbDelimiter nextgroup=bbShFuncRegion skipwhite |
87 | syn region bbShFuncRegion matchgroup=bbDelimiter start="{\s*$" end="^}\s*$" contained contains=@shell | 89 | syn region bbShFuncRegion matchgroup=bbDelimiter start="{\s*$" end="^}\s*$" contained contains=@shell |
88 | 90 | ||
89 | " Python value inside shell functions | 91 | " Python value inside shell functions |
@@ -91,7 +93,7 @@ syn region shDeref start=+${@+ skip=+\\$+ excludenl end=+}+ contained co | |||
91 | 93 | ||
92 | " BitBake python metadata | 94 | " BitBake python metadata |
93 | syn keyword bbPyFlag python contained | 95 | syn keyword bbPyFlag python contained |
94 | syn match bbPyFuncDef "^\(fakeroot\s*\)\?\(python\)\(\s\+[0-9A-Za-z_${}\-\.]\+\)\?\(\s*()\s*\)\({\)\@=" contains=bbShFakeRootFlag,bbPyFlag,bbFunction,bbVarDeref,bbDelimiter nextgroup=bbPyFuncRegion skipwhite | 96 | syn match bbPyFuncDef "^\(fakeroot\s*\)\?\(python\)\(\s\+[0-9A-Za-z_:${}\-\.]\+\)\?\(\s*()\s*\)\({\)\@=" contains=bbShFakeRootFlag,bbPyFlag,bbFunction,bbOverrideOperator,bbVarDeref,bbDelimiter nextgroup=bbPyFuncRegion skipwhite |
95 | syn region bbPyFuncRegion matchgroup=bbDelimiter start="{\s*$" end="^}\s*$" contained contains=@python | 97 | syn region bbPyFuncRegion matchgroup=bbDelimiter start="{\s*$" end="^}\s*$" contained contains=@python |
96 | 98 | ||
97 | " BitBake 'def'd python functions | 99 | " BitBake 'def'd python functions |
@@ -122,5 +124,6 @@ hi def link bbStatement Statement | |||
122 | hi def link bbStatementRest Identifier | 124 | hi def link bbStatementRest Identifier |
123 | hi def link bbOEFunctions Special | 125 | hi def link bbOEFunctions Special |
124 | hi def link bbVarPyValue PreProc | 126 | hi def link bbVarPyValue PreProc |
127 | hi def link bbOverrideOperator Operator | ||
125 | 128 | ||
126 | let b:current_syntax = "bb" | 129 | let b:current_syntax = "bb" |