This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR addresses the feedback from @Fedexyz (comment) and @Songworks (comment) around matching full paths using
_
or\\
.This is a common pattern in PHP, where in order to create namespaces, people either use underscores or
\\
(for real namespacing) on the class names.Usually, these namespaces match the folder structure, so a class named
App_Controllers_MyController
or\\App\\Controllers\\MyController
will be located insrc/App/Controllers/MyController.php
.For convenience, before the fast mode, people used to copy the classname from the editor and paste it on the fuzzy finder, which returned the result
src/App/Controllers/MyController.php
that the user expected (even if the matching logic was not very clear).When we implemented the fast mode, this functionality was lost, so this PR adds the relevant logic to
fuzzy-native
(the library that the fast mode uses to match paths) to add it back.Alternate designs
I've considered making this mode configurable, but this would add extra complexity on the logic, and since the previous fuzzyfinder matcher didn't have it configurable I thought it's not worth it to add an extra config option.