summaryrefslogtreecommitdiffstats
path: root/bitbake/contrib/vim/syntax/bitbake.vim
diff options
context:
space:
mode:
authorJoshua Watt <JPEWhacker@gmail.com>2021-08-04 10:03:18 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-08-04 20:48:58 +0100
commit0b3be2821d740b9109c7b70cb7123764d80ef37b (patch)
tree70f9f7bad8540852e80e39024c846ec1591000b8 /bitbake/contrib/vim/syntax/bitbake.vim
parent7171392132fb76b11b3fffea028e3f0bb1921dd3 (diff)
downloadpoky-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/contrib/vim/syntax/bitbake.vim')
-rw-r--r--bitbake/contrib/vim/syntax/bitbake.vim11
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=+'+
51syn match bbExport "^export" nextgroup=bbIdentifier skipwhite 51syn match bbExport "^export" nextgroup=bbIdentifier skipwhite
52syn keyword bbExportFlag export contained nextgroup=bbIdentifier skipwhite 52syn keyword bbExportFlag export contained nextgroup=bbIdentifier skipwhite
53syn match bbIdentifier "[a-zA-Z0-9\-_\.\/\+]\+" display contained 53syn match bbIdentifier "[a-zA-Z0-9\-_\.\/\+]\+" display contained
54syn match bbVarDeref "${[a-zA-Z0-9\-_\.\/\+]\+}" contained 54syn match bbVarDeref "${[a-zA-Z0-9\-_:\.\/\+]\+}" contained
55syn match bbVarEq "\(:=\|+=\|=+\|\.=\|=\.\|?=\|??=\|=\)" contained nextgroup=bbVarValue 55syn match bbVarEq "\(:=\|+=\|=+\|\.=\|=\.\|?=\|??=\|=\)" contained nextgroup=bbVarValue
56syn match bbVarDef "^\(export\s*\)\?\([a-zA-Z0-9\-_\.\/\+]\+\(_[${}a-zA-Z0-9\-_\.\/\+]\+\)\?\)\s*\(:=\|+=\|=+\|\.=\|=\.\|?=\|??=\|=\)\@=" contains=bbExportFlag,bbIdentifier,bbVarDeref nextgroup=bbVarEq 56syn match bbVarDef "^\(export\s*\)\?\([a-zA-Z0-9\-_\.\/\+][${}a-zA-Z0-9\-_:\.\/\+]*\)\s*\(:=\|+=\|=+\|\.=\|=\.\|?=\|??=\|=\)\@=" contains=bbExportFlag,bbIdentifier,bbOverrideOperator,bbVarDeref nextgroup=bbVarEq
57syn match bbVarValue ".*$" contained contains=bbString,bbVarDeref,bbVarPyValue 57syn match bbVarValue ".*$" contained contains=bbString,bbVarDeref,bbVarPyValue
58syn region bbVarPyValue start=+${@+ skip=+\\$+ end=+}+ contained contains=@python 58syn 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
78syn match bbFunction "\h[0-9A-Za-z_\-\.]*" display contained contains=bbOEFunctions 78syn match bbFunction "\h[0-9A-Za-z_\-\.]*" display contained contains=bbOEFunctions
79 79
80syn keyword bbOverrideOperator append prepend contained
81
80" BitBake shell metadata 82" BitBake shell metadata
81syn include @shell syntax/sh.vim 83syn include @shell syntax/sh.vim
82if exists("b:current_syntax") 84if exists("b:current_syntax")
83 unlet b:current_syntax 85 unlet b:current_syntax
84endif 86endif
85syn keyword bbShFakeRootFlag fakeroot contained 87syn keyword bbShFakeRootFlag fakeroot contained
86syn match bbShFuncDef "^\(fakeroot\s*\)\?\([\.0-9A-Za-z_${}\-\.]\+\)\(python\)\@<!\(\s*()\s*\)\({\)\@=" contains=bbShFakeRootFlag,bbFunction,bbVarDeref,bbDelimiter nextgroup=bbShFuncRegion skipwhite 88syn match bbShFuncDef "^\(fakeroot\s*\)\?\([\.0-9A-Za-z_:${}\-\.]\+\)\(python\)\@<!\(\s*()\s*\)\({\)\@=" contains=bbShFakeRootFlag,bbFunction,bbOverrideOperator,bbVarDeref,bbDelimiter nextgroup=bbShFuncRegion skipwhite
87syn region bbShFuncRegion matchgroup=bbDelimiter start="{\s*$" end="^}\s*$" contained contains=@shell 89syn 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
93syn keyword bbPyFlag python contained 95syn keyword bbPyFlag python contained
94syn match bbPyFuncDef "^\(fakeroot\s*\)\?\(python\)\(\s\+[0-9A-Za-z_${}\-\.]\+\)\?\(\s*()\s*\)\({\)\@=" contains=bbShFakeRootFlag,bbPyFlag,bbFunction,bbVarDeref,bbDelimiter nextgroup=bbPyFuncRegion skipwhite 96syn match bbPyFuncDef "^\(fakeroot\s*\)\?\(python\)\(\s\+[0-9A-Za-z_:${}\-\.]\+\)\?\(\s*()\s*\)\({\)\@=" contains=bbShFakeRootFlag,bbPyFlag,bbFunction,bbOverrideOperator,bbVarDeref,bbDelimiter nextgroup=bbPyFuncRegion skipwhite
95syn region bbPyFuncRegion matchgroup=bbDelimiter start="{\s*$" end="^}\s*$" contained contains=@python 97syn 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
122hi def link bbStatementRest Identifier 124hi def link bbStatementRest Identifier
123hi def link bbOEFunctions Special 125hi def link bbOEFunctions Special
124hi def link bbVarPyValue PreProc 126hi def link bbVarPyValue PreProc
127hi def link bbOverrideOperator Operator
125 128
126let b:current_syntax = "bb" 129let b:current_syntax = "bb"