From 273a8b43689651d123415673daa3584bc79a6e19 Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Fri, 18 Aug 2023 17:25:20 +0200 Subject: [PATCH] editor: Recognize '$' as a Word character. This fixes PHP variable completion. When we were querying for completions, PHP LS returned proper matches for variables which we filtered out as our query did not include a `$` character. Z-2819 --- crates/language/src/buffer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/language/src/buffer.rs b/crates/language/src/buffer.rs index 0b10432a9f4747d93ff974ac72ddbbb6783fe676..48dc936a949c5cc47e12199d4d895b9f8a09ddf6 100644 --- a/crates/language/src/buffer.rs +++ b/crates/language/src/buffer.rs @@ -2987,7 +2987,7 @@ pub fn contiguous_ranges( pub fn char_kind(c: char) -> CharKind { if c.is_whitespace() { CharKind::Whitespace - } else if c.is_alphanumeric() || c == '_' { + } else if c.is_alphanumeric() || c == '_' || c == '$' { CharKind::Word } else { CharKind::Punctuation