Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use actual word boundaries when filtering completions
Previously, this would only split words on upper-lower boundaries or on `_`/`-`. The result was that we would filter out completions too aggressively. The filter works by taking a suggested completion, say `foo_bar_lol`, split it up into words - `foo`, `bar, `lol` - and check whether any of the words start with the same characters as what the user already typed: `fo`, or `bar`, ... In the case of Ruby, though, `:` wasn't considered a word boundary. If the LSP would return `:foobar` when the user typed `:foo`, we'd check if there are any completions that match `foo` (because that's the current word) but we'd compare against `foobar`, not `:` or `:foobar`. With this change, we get more match candidates and thus more completions in Ruby. Co-authored-by: Max <[email protected]>
- Loading branch information