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
This commit is contained in:
Piotr Osiewicz 2023-08-18 17:25:20 +02:00
parent 8451e7eb7e
commit 273a8b4368

View file

@ -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