aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--helix-core/src/syntax.rs4
-rw-r--r--runtime/queries/go/textobjects.scm2
2 files changed, 4 insertions, 2 deletions
diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs
index 72b0e956..905b3347 100644
--- a/helix-core/src/syntax.rs
+++ b/helix-core/src/syntax.rs
@@ -413,7 +413,9 @@ impl LanguageConfiguration {
let lang_name = self.language_id.to_ascii_lowercase();
let query_text = read_query(&lang_name, "textobjects.scm");
let lang = self.highlight_config.get()?.as_ref()?.language;
- let query = Query::new(lang, &query_text).ok()?;
+ let query = Query::new(lang, &query_text)
+ .map_err(|e| log::error!("Failed to parse textobjects.scm queries: {}", e))
+ .ok()?;
Some(TextObjectQuery { query })
})
.as_ref()
diff --git a/runtime/queries/go/textobjects.scm b/runtime/queries/go/textobjects.scm
index d77e14b7..3cdf6203 100644
--- a/runtime/queries/go/textobjects.scm
+++ b/runtime/queries/go/textobjects.scm
@@ -12,7 +12,7 @@
(type_spec (type_identifier) (struct_type (field_declaration_list (_)?) @class.inside))) @class.around
(type_declaration
- (type_spec (type_identifier) (interface_type (method_spec_list (_)?) @class.inside))) @class.around
+ (type_spec (type_identifier) (interface_type (method_spec)+ @class.inside))) @class.around
(parameter_list
(_) @parameter.inside)