add query expression for word-boundary and use it in symbols and project-symbols #170
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.
Fix #169
Related #50
What will change
Add query expression which specify word-boundary(
\b
) search.Here is how query translated
If
\b
is meaningless(e.g.>=
), it don't add\b
, but remove>
or<
for consistency.NOTE: I also evaluated not-trim starting
>
so that user don't need to search by>>=
for search>=
literal.But it was not obvious when
>
is removed or not removed, which make user learning difficult, so avoided this approach.Auto enable word boundary query when symbols and project-symbols invoked by by-current-word command
Purpose: To make quick previewing by
symbols-by-current-word
orproject-symbols-by-current-word
further useful.Before: Problematic situation
@refresh
function and invokenarrow:symbols-by-current-word
: Previewing unwanted function(multiple symbols which containsrefresh
)narrow:project-symbols-by-current-word
: Previewing unwanted function(multiple symbols which containsrefresh
)After: Find target thanks to
>refresh<
query.@refresh
function and invokenarrow:symbols-by-current-word
: Previewing singlepreview
function.narrow:project-symbols-by-current-word
: Previewing singlepreview
function.