From ab6d23554080af075bea5969c3db76189fedc7b5 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 8 Apr 2024 21:35:55 +0100 Subject: [PATCH] Add map properties highlighting --- queries/highlights.scm | 6 ++++++ test/highlight/properties.bp | 7 +++++++ 2 files changed, 13 insertions(+) create mode 100644 test/highlight/properties.bp diff --git a/queries/highlights.scm b/queries/highlights.scm index 9eae8a0..a28d844 100644 --- a/queries/highlights.scm +++ b/queries/highlights.scm @@ -49,4 +49,10 @@ field: (identifier) @variable.member)) ; }}} +; Expressions {{{ +(map_expression + (property + field: (identifier) @property)) +; }}} + ; vim: sw=2 foldmethod=marker diff --git a/test/highlight/properties.bp b/test/highlight/properties.bp new file mode 100644 index 0000000..6bc97ef --- /dev/null +++ b/test/highlight/properties.bp @@ -0,0 +1,7 @@ +foo { + field: { + // <- variable.member + key: 42, + // <- property + }, +}