diff --git a/queries/highlights.scm b/queries/highlights.scm index a28d844..b4cc660 100644 --- a/queries/highlights.scm +++ b/queries/highlights.scm @@ -53,6 +53,9 @@ (map_expression (property field: (identifier) @property)) + +(select_expression + "select" @keyword.conditional) ; }}} ; vim: sw=2 foldmethod=marker diff --git a/test/highlight/select.bp b/test/highlight/select.bp new file mode 100644 index 0000000..831608d --- /dev/null +++ b/test/highlight/select.bp @@ -0,0 +1,15 @@ +foo = select(soong_config_variable("my_namespace", "my_var"), { + // ^ keyword.conditional + "foo": unset, + default: "bar", +}) + +// It can still be used as a normal variable name +select = 42 +// <- variable + +// Or module property +foo { + select: 42, + // <- variable.member +}