From 3011df4f35e43f9f7690b236c85ab54f210c8b3a Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Mon, 15 Jan 2024 01:33:26 -0500 Subject: Bump tree-sitter to latest master (#9317) * query capture names now return `&str`s rather than `String`s * the `#any-of?` predicate is now supported--- helix-core/src/syntax.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'helix-core/src/syntax.rs') diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs index 102ecb15..4e44c486 100644 --- a/helix-core/src/syntax.rs +++ b/helix-core/src/syntax.rs @@ -1727,7 +1727,7 @@ impl HighlightConfiguration { let mut local_scope_capture_index = None; for (i, name) in query.capture_names().iter().enumerate() { let i = Some(i as u32); - match name.as_str() { + match *name { "local.definition" => local_def_capture_index = i, "local.definition-value" => local_def_value_capture_index = i, "local.reference" => local_ref_capture_index = i, @@ -1738,7 +1738,7 @@ impl HighlightConfiguration { for (i, name) in injections_query.capture_names().iter().enumerate() { let i = Some(i as u32); - match name.as_str() { + match *name { "injection.content" => injection_content_capture_index = i, "injection.language" => injection_language_capture_index = i, "injection.filename" => injection_filename_capture_index = i, @@ -1768,7 +1768,7 @@ impl HighlightConfiguration { } /// Get a slice containing all of the highlight names used in the configuration. - pub fn names(&self) -> &[String] { + pub fn names(&self) -> &[&str] { self.query.capture_names() } -- cgit v1.2.3-70-g09d2