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:25 +0000 |
| commit | 34bafb3cf27116872ade1d4d8f322f739ba0d3fd (patch) | |
| tree | 5768cf1b8edc61cf6349d20282dc0cffe3a8b7ef | |
| parent | fdef56a596b937d099545aee5d0ff6fd4abc4c84 (diff) | |
| download | poky-34bafb3cf27116872ade1d4d8f322f739ba0d3fd.tar.gz | |
bitbake: 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
(Bitbake rev: 39691d5d0f44a266f917a13884707283f83543de)
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | bitbake/contrib/vim/syntax/bitbake.vim | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/bitbake/contrib/vim/syntax/bitbake.vim b/bitbake/contrib/vim/syntax/bitbake.vim index c5ea80fdf2..8f39b8f951 100644 --- a/bitbake/contrib/vim/syntax/bitbake.vim +++ b/bitbake/contrib/vim/syntax/bitbake.vim | |||
| @@ -63,13 +63,14 @@ syn region bbVarFlagFlag matchgroup=bbArrayBrackets start="\[" end="\]\s* | |||
| 63 | 63 | ||
| 64 | " Includes and requires | 64 | " Includes and requires |
| 65 | syn keyword bbInclude inherit include require contained | 65 | syn keyword bbInclude inherit include require contained |
| 66 | syn match bbIncludeRest ".*$" contained contains=bbString,bbVarDeref | 66 | syn match bbIncludeRest ".*$" contained contains=bbString,bbVarDeref,bbVarPyValue |
| 67 | syn match bbIncludeLine "^\(inherit\|include\|require\)\s\+" contains=bbInclude nextgroup=bbIncludeRest | 67 | syn match bbIncludeLine "^\(inherit\|include\|require\)\s\+" contains=bbInclude nextgroup=bbIncludeRest |
| 68 | 68 | ||
| 69 | " Add taks and similar | 69 | " Add taks and similar |
| 70 | syn keyword bbStatement addtask deltask addhandler after before EXPORT_FUNCTIONS contained | 70 | syn keyword bbStatement addtask deltask addhandler after before EXPORT_FUNCTIONS contained |
| 71 | syn match bbStatementRest ".*$" skipwhite contained contains=bbStatement | 71 | syn match bbStatementRest /[^\\]*$/ skipwhite contained contains=bbStatement,bbVarDeref,bbVarPyValue |
| 72 | syn match bbStatementLine "^\(addtask\|deltask\|addhandler\|after\|before\|EXPORT_FUNCTIONS\)\s\+" contains=bbStatement nextgroup=bbStatementRest | 72 | syn region bbStatementRestCont start=/.*\\$/ end=/^[^\\]*$/ contained contains=bbStatement,bbVarDeref,bbVarPyValue,bbContinue keepend |
| 73 | syn match bbStatementLine "^\(addtask\|deltask\|addhandler\|after\|before\|EXPORT_FUNCTIONS\)\s\+" contains=bbStatement nextgroup=bbStatementRest,bbStatementRestCont | ||
| 73 | 74 | ||
| 74 | " OE Important Functions | 75 | " OE Important Functions |
| 75 | syn keyword bbOEFunctions do_fetch do_unpack do_patch do_configure do_compile do_stage do_install do_package contained | 76 | 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 | |||
| 122 | hi def link bbPyDef Statement | 123 | hi def link bbPyDef Statement |
| 123 | hi def link bbStatement Statement | 124 | hi def link bbStatement Statement |
| 124 | hi def link bbStatementRest Identifier | 125 | hi def link bbStatementRest Identifier |
| 126 | hi def link bbStatementRestCont Identifier | ||
| 125 | hi def link bbOEFunctions Special | 127 | hi def link bbOEFunctions Special |
| 126 | hi def link bbVarPyValue PreProc | 128 | hi def link bbVarPyValue PreProc |
| 127 | hi def link bbOverrideOperator Operator | 129 | hi def link bbOverrideOperator Operator |
