summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Watt <JPEWhacker@gmail.com>2023-12-22 10:01:12 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-12-23 16:20:25 +0000
commit34bafb3cf27116872ade1d4d8f322f739ba0d3fd (patch)
tree5768cf1b8edc61cf6349d20282dc0cffe3a8b7ef
parentfdef56a596b937d099545aee5d0ff6fd4abc4c84 (diff)
downloadpoky-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.vim8
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
65syn keyword bbInclude inherit include require contained 65syn keyword bbInclude inherit include require contained
66syn match bbIncludeRest ".*$" contained contains=bbString,bbVarDeref 66syn match bbIncludeRest ".*$" contained contains=bbString,bbVarDeref,bbVarPyValue
67syn match bbIncludeLine "^\(inherit\|include\|require\)\s\+" contains=bbInclude nextgroup=bbIncludeRest 67syn match bbIncludeLine "^\(inherit\|include\|require\)\s\+" contains=bbInclude nextgroup=bbIncludeRest
68 68
69" Add taks and similar 69" Add taks and similar
70syn keyword bbStatement addtask deltask addhandler after before EXPORT_FUNCTIONS contained 70syn keyword bbStatement addtask deltask addhandler after before EXPORT_FUNCTIONS contained
71syn match bbStatementRest ".*$" skipwhite contained contains=bbStatement 71syn match bbStatementRest /[^\\]*$/ skipwhite contained contains=bbStatement,bbVarDeref,bbVarPyValue
72syn match bbStatementLine "^\(addtask\|deltask\|addhandler\|after\|before\|EXPORT_FUNCTIONS\)\s\+" contains=bbStatement nextgroup=bbStatementRest 72syn region bbStatementRestCont start=/.*\\$/ end=/^[^\\]*$/ contained contains=bbStatement,bbVarDeref,bbVarPyValue,bbContinue keepend
73syn 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
75syn keyword bbOEFunctions do_fetch do_unpack do_patch do_configure do_compile do_stage do_install do_package contained 76syn 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
122hi def link bbPyDef Statement 123hi def link bbPyDef Statement
123hi def link bbStatement Statement 124hi def link bbStatement Statement
124hi def link bbStatementRest Identifier 125hi def link bbStatementRest Identifier
126hi def link bbStatementRestCont Identifier
125hi def link bbOEFunctions Special 127hi def link bbOEFunctions Special
126hi def link bbVarPyValue PreProc 128hi def link bbVarPyValue PreProc
127hi def link bbOverrideOperator Operator 129hi def link bbOverrideOperator Operator