diff options
author | Joshua Watt <JPEWhacker@gmail.com> | 2023-12-22 10:01:12 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-12-23 16:20:23 +0000 |
commit | 39691d5d0f44a266f917a13884707283f83543de (patch) | |
tree | 3f938ce1320326d7862b322b4f547b025d6a1d31 | |
parent | fe0881615896de844141393b21a121f7c3fa9d16 (diff) | |
download | bitbake-contrib-39691d5d0f44a266f917a13884707283f83543de.tar.gz |
contrib/vim: Syntax improvements
Makes a few improvments to the vim Bitbake syntax plugin:
1) Highlight python expansion expressions "${@...}" in
inherit/include/require
2) Highlight variables "${..}" and python expressions "${@...}" in
addtask/deltask/addhandler
3) Correctly handle multi-line sequences in addtask/deltask/addhanlder
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | contrib/vim/syntax/bitbake.vim | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/contrib/vim/syntax/bitbake.vim b/contrib/vim/syntax/bitbake.vim index c5ea80fdf..8f39b8f95 100644 --- a/contrib/vim/syntax/bitbake.vim +++ b/contrib/vim/syntax/bitbake.vim @@ -63,13 +63,14 @@ syn region bbVarFlagFlag matchgroup=bbArrayBrackets start="\[" end="\]\s* " Includes and requires syn keyword bbInclude inherit include require contained -syn match bbIncludeRest ".*$" contained contains=bbString,bbVarDeref +syn match bbIncludeRest ".*$" contained contains=bbString,bbVarDeref,bbVarPyValue syn match bbIncludeLine "^\(inherit\|include\|require\)\s\+" contains=bbInclude nextgroup=bbIncludeRest " Add taks and similar syn keyword bbStatement addtask deltask addhandler after before EXPORT_FUNCTIONS contained -syn match bbStatementRest ".*$" skipwhite contained contains=bbStatement -syn match bbStatementLine "^\(addtask\|deltask\|addhandler\|after\|before\|EXPORT_FUNCTIONS\)\s\+" contains=bbStatement nextgroup=bbStatementRest +syn match bbStatementRest /[^\\]*$/ skipwhite contained contains=bbStatement,bbVarDeref,bbVarPyValue +syn region bbStatementRestCont start=/.*\\$/ end=/^[^\\]*$/ contained contains=bbStatement,bbVarDeref,bbVarPyValue,bbContinue keepend +syn match bbStatementLine "^\(addtask\|deltask\|addhandler\|after\|before\|EXPORT_FUNCTIONS\)\s\+" contains=bbStatement nextgroup=bbStatementRest,bbStatementRestCont " OE Important Functions syn keyword bbOEFunctions do_fetch do_unpack do_patch do_configure do_compile do_stage do_install do_package contained @@ -122,6 +123,7 @@ hi def link bbPyFlag Type hi def link bbPyDef Statement hi def link bbStatement Statement hi def link bbStatementRest Identifier +hi def link bbStatementRestCont Identifier hi def link bbOEFunctions Special hi def link bbVarPyValue PreProc hi def link bbOverrideOperator Operator |