Detailed changes
@@ -1421,8 +1421,8 @@ fn test_language_config_at(cx: &mut MutableAppContext) {
)
.with_override_query(
r#"
- (jsx_element) @override.element
- (string) @override.string
+ (jsx_element) @element
+ (string) @string
"#,
)
.unwrap();
@@ -829,10 +829,10 @@ impl Language {
let mut values = HashMap::default();
for (ix, name) in query.capture_names().iter().enumerate() {
- if let Some(override_name) = name.strip_prefix("override.") {
- let value = self.config.overrides.remove(override_name).ok_or_else(|| {
+ if !name.starts_with('_') {
+ let value = self.config.overrides.remove(name).ok_or_else(|| {
anyhow!(
- "language {:?} has override in query but not in config: {override_name:?}",
+ "language {:?} has override in query but not in config: {name:?}",
self.config.name
)
})?;
@@ -1,2 +1,2 @@
-(comment) @override.comment
-(string_literal) @override.string
+(comment) @comment
+(string_literal) @string
@@ -1,2 +1,2 @@
-(comment) @override.comment
-(string_literal) @override.string
+(comment) @comment
+(string_literal) @string
@@ -1,2 +1,2 @@
-(comment) @override.comment
-(string_value) @override.string
+(comment) @comment
+(string_value) @string
@@ -1,2 +1,2 @@
-(comment) @override.comment
-[(string) (charlist)] @override.string
+(comment) @comment
+[(string) (charlist)] @string
@@ -1,6 +1,6 @@
-(comment) @override.comment
+(comment) @comment
[
(interpreted_string_literal)
(raw_string_literal)
(rune_literal)
-] @override.string
+] @string
@@ -1,2 +1,2 @@
-(comment) @override.comment
-(quoted_attribute_value) @override.string
+(comment) @comment
+(quoted_attribute_value) @string
@@ -1,9 +1,9 @@
-(comment) @override.comment
-(string) @override.string
+(comment) @comment
+(string) @string
[
(jsx_element)
(jsx_fragment)
(jsx_self_closing_element)
(jsx_expression)
-] @override.element
+] @element
@@ -1,2 +1 @@
-(comment) @comment
-(string) @override.string
+(string) @string
@@ -1,2 +1,2 @@
-(comment) @override.comment
-(string) @override.string
+(comment) @comment
+(string) @string
@@ -1,2 +1,2 @@
-(comment) @override.comment
-(string) @override.string
+(comment) @comment
+(string) @string
@@ -1,8 +1,8 @@
[
(string_literal)
(raw_string_literal)
-] @override.string
+] @string
[
(line_comment)
(block_comment)
-] @override.comment
+] @comment
@@ -2,5 +2,5 @@
(comment)
(block_comment)
(directive)
-] @override.comment
-(string) @override.string
+] @comment
+(string) @string
@@ -1,2 +1,2 @@
-(comment) @override.comment
-(string) @override.string
+(comment) @comment
+(string) @string
@@ -3,5 +3,5 @@
(jsx_fragment)
(jsx_self_closing_element)
(jsx_expression)
-] @override.element
-(string) @override.string
+] @element
+(string) @string
@@ -1,2 +1,2 @@
-(comment) @override.comment
-(string) @override.string
+(comment) @comment
+(string) @string