Closed dmfay closed 11 months ago
Your configuration is wrong. The filter order is not changed.
If you want to change match, you need to change matchers
like this.
converter_display_word
must be executed before matcher_fzf
.
\ sourceOptions: #{
\ _: #{
\ converters: [],
\ sorters: [ 'sorter_fzf'],
\ matchers: ['converter_display_word','matcher_fzf'],
\ },
\ },
I didn't realize the filters could go anywhere in the pipeline, thank you!
All filters has same interface.
matchers
, sorters
, converters
is just applied order.
Problems summary
I upgraded recently and noticed a behavior change with grep. I had configured converter_display_word and ddu-filter-fzf in order to filter on both the filename and the matched line. Now only the matched line is filtered.
I found a commit newly specifying that filters are applied matcher -> sorter -> converter, and adding logs in converter_display_word and ddu-filter-fzf confirmed this. filter-fzf logged first, then converter_display_word. So both the
matcherKey
andword
for fzf only contain the matched line instead of "$filename: $matchedLine". How can I filter on both?Environment Information
deno -V
output):deno 1.37.2
:version
output:Provide a minimal init.vim/vimrc without plugin managers (Required!)
How to reproduce the problem from neovim/Vim startup (Required!)
<space>/
to open grep promptScreenshot (if possible)
Before I upgraded, this fzf filter string
types
would have matched all results in types.ts first since that's the earliest matching text in$filename $matchedLine
.