aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/vim/syntax/bb.vim
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/vim/syntax/bb.vim')
-rw-r--r--contrib/vim/syntax/bb.vim12
1 files changed, 12 insertions, 0 deletions
diff --git a/contrib/vim/syntax/bb.vim b/contrib/vim/syntax/bb.vim
index f80eb8b63..d74a6ab52 100644
--- a/contrib/vim/syntax/bb.vim
+++ b/contrib/vim/syntax/bb.vim
@@ -50,9 +50,17 @@ syn match bbIdentifier "[a-zA-Z0-9\-_]\+" display contained
syn match bbVarEq "=" contained contains=bbOperator nextgroup=bbVarValue
syn match bbVarValue ".*$" contained contains=bbString
+
+" BitBake variable metadata flags
+syn match bbVarFlagDef "^\([a-zA-Z0-9\-_]\+\)\(\[[a-zA-Z0-9\-_]\+\]\)\@=" contains=bbIdentifier nextgroup=bbVarFlagFlag
+syn region bbVarFlagFlag matchgroup=bbArrayBrackets start="\[" end="\]\s*\(=\)\@=" keepend excludenl contained contains=bbIdentifier nextgroup=bbVarEq
+"syn match bbVarFlagFlag "\[\([a-zA-Z0-9\-_]\+\)\]\s*\(=\)\@=" contains=bbIdentifier nextgroup=bbVarEq
+
+
" Functions!
syn match bbFunction "\h\w*" display contained
+
" BitBake python metadata
syn include @python syntax/python.vim
if exists("b:current_syntax")
@@ -64,6 +72,7 @@ syn match bbPythonFuncDef "^\(python\s\+\w\+\s*()\s*\)\({\)\@=" contains=bbPytho
syn region bbPythonFuncRegion matchgroup=bbDelimiter start="{" end="^}$" keepend contained contains=@python
"hi def link bbPythonFuncRegion Comment
+
" BitBake shell metadata
syn include @shell syntax/sh.vim
if exists("b:current_syntax")
@@ -87,6 +96,9 @@ syn region bbDefRegion start=":$" end='^$' end='^\(\s\)\@!' contained contains=
" BitBake statements
syn keyword bbStatement include inherit addtask addhandler
+syn match bbArrayBrackets "[\[\]]" contained
+hi def link bbArrayBrackets Statement
+
hi def link bbDef Statement
hi def link bbPythonFlag Type
hi def link bbStatement Statement