diff --git a/runtime/queries/bash/highlights.scm b/runtime/queries/bash/highlights.scm index 1aa35aa7c..67d5f7cb9 100644 --- a/runtime/queries/bash/highlights.scm +++ b/runtime/queries/bash/highlights.scm @@ -7,7 +7,10 @@ (command_name) @function -(variable_name) @variable.other.member +(variable_name) @variable + +((variable_name) @constant + (#match? @constant "^[A-Z][A-Z_0-9]*$")) [ "if" @@ -51,7 +54,7 @@ (command_substitution) (process_substitution) (expansion) -]@embedded +] @embedded [ "$" diff --git a/runtime/queries/devicetree/highlights.scm b/runtime/queries/devicetree/highlights.scm index d27c79e4a..b9b29fe20 100644 --- a/runtime/queries/devicetree/highlights.scm +++ b/runtime/queries/devicetree/highlights.scm @@ -51,14 +51,14 @@ (integer_literal) @constant.numeric.integer +(identifier) @variable + (call_expression function: (identifier) @function) (labeled_item label: (identifier) @label) -(identifier) @variable - (unit_address) @tag (reference) @constant diff --git a/runtime/queries/yaml/highlights.scm b/runtime/queries/yaml/highlights.scm index e4fed27a9..6d58e4459 100644 --- a/runtime/queries/yaml/highlights.scm +++ b/runtime/queries/yaml/highlights.scm @@ -1,13 +1,3 @@ -(block_mapping_pair - key: (flow_node [(double_quote_scalar) (single_quote_scalar)] @variable.other.member)) -(block_mapping_pair - key: (flow_node (plain_scalar (string_scalar) @variable.other.member))) - -(flow_mapping - (_ key: (flow_node [(double_quote_scalar) (single_quote_scalar)] @variable.other.member))) -(flow_mapping - (_ key: (flow_node (plain_scalar (string_scalar) @variable.other.member)))) - (boolean_scalar) @constant.builtin.boolean (null_scalar) @constant.builtin (double_quote_scalar) @string @@ -24,6 +14,16 @@ (yaml_directive) @keyword (ERROR) @error +(block_mapping_pair + key: (flow_node [(double_quote_scalar) (single_quote_scalar)] @variable.other.member)) +(block_mapping_pair + key: (flow_node (plain_scalar (string_scalar) @variable.other.member))) + +(flow_mapping + (_ key: (flow_node [(double_quote_scalar) (single_quote_scalar)] @variable.other.member))) +(flow_mapping + (_ key: (flow_node (plain_scalar (string_scalar) @variable.other.member)))) + [ "," "-"