Closed linrongbin16 closed 7 months ago
Attention: 260 lines
in your changes are missing coverage. Please review.
Comparison is base (
194d338
) 75.17% compared to head (7cf30b5
) 77.74%.:exclamation: Current head 7cf30b5 differs from pull request most recent head e838972. Consider uploading reports for the commit e838972 to get more accurate results
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I changed the internal implementation of communication between provider and buffer previewer.
In previous implementation, I'm using
--bind=focus:execute-silent(echo {} > cache_file)
to dump fzf's current pointer's line into acache_file
, and watch the file's change withuv.new_fs_event
. then render the line (actually a file name) to the buffer previewer.The uv's fs event is awesome, but binding
echo
to fzf could lead to stucking, since fzf'sfocus
event is running in sync mode, not async. so when you typing fast, it could be quite laggy. I hate it.In this PR, I use the fzf's experimental feature:
curl localhost:port
to get the fzf current status. It will output a json string with:{"current":{"index":97,"text": "lua/fzfx.lua"}}
, thecurrent.text
is exactly the current fzf's pointer's line.So I'm trying to get the current line data with
uv.spawn
, which is also async, it should have better performance. But actually I still met some performance bottle necks:current
field. For now I'm using a partial decoding method, to hack into the json and retrieve only thecurrent
field.Regresion test
Platforms
Tasks
CTRL-J
/CTRL-K
to move down/up and preview contents.CTRL-U
/CTRL-R
to switch between restricted/unrestricted mode, and the lines count is consistent when press multiple times.V
/W
/P
/R
variants (visual selection, cursor word, yank text, resume last).ESC
to quit,ENTER
to open file, and open thetest/hello world.txt
,test/goodbye world/goodbye.lua
files.fd
andfind
works.CTRL-J
/CTRL-K
to move down/up and preview contents.CTRL-U
/CTRL-R
to switch between restricted/unrestricted mode, and the lines count is consistent when press multiple times.-w
to match word only, use-g *.lua
to search only lua files.V
/W
/P
/R
variants (visual selection, cursor word, yank text, resume last).ESC
to quit,ENTER
to open file, and open thetest/hello world.txt
,test/goodbye world/goodbye.lua
files.rg
andgrep
works.CTRL-J
/CTRL-K
to move down/up and preview contents.CTRL-D
to delete buffers, and delete thetest/hello world.txt
,test/goodbye world/goodbye.lua
buffers.V
/W
/P
/R
variants (visual selection, cursor word, yank text, resume last).ESC
to quit,ENTER
to open file.CTRL-J
/CTRL-K
to move down/up and preview contents.CTRL-U
/CTRL-W
to switch between workspace/current folder mode.V
/W
/P
/R
variants (visual selection, cursor word, yank text, resume last).ESC
to quit,ENTER
to open file.CTRL-J
/CTRL-K
to move down/up and preview contents.V
/W
/P
/R
variants (visual selection, cursor word, yank text, resume last).ESC
to quit,ENTER
to open file.CTRL-J
/CTRL-K
to move down/up and preview contents.CTRL-U
/CTRL-W
to switch between workspace/current folder mode.V
/W
/P
/R
variants (visual selection, cursor word, yank text, resume last).ESC
to quit,ENTER
to open file.delta
works.CTRL-J
/CTRL-K
to move down/up and preview contents.CTRL-R
/CTRL-O
to switch between local/remote branches.V
/W
/P
/R
variants (visual selection, cursor word, yank text, resume last).ESC
to quit,ENTER
to checkout branch.CTRL-J
/CTRL-K
to move down/up and preview contents.CTRL-U
/CTRL-A
to switch between git repo commits/current buffer commits.V
/W
/P
/R
variants (visual selection, cursor word, yank text, resume last).ESC
to quit,ENTER
to copy commit hash.delta
works.CTRL-J
/CTRL-K
to move down/up and preview contents.V
/W
/P
/R
variants (visual selection, cursor word, yank text, resume last).ESC
to quit,ENTER
to copy commit hash.delta
works.CTRL-J
/CTRL-K
to move down/up and preview contents.CTRL-U
/CTRL-W
to switch between workspace/current buffer diagnostics.V
/W
/P
/R
variants (visual selection, cursor word, yank text, resume last).ESC
to quit,ENTER
to open file.CTRL-J
/CTRL-K
to move down/up and preview contents.ESC
to quit,ENTER
to open file.CTRL-J
/CTRL-K
to move down/up and preview contents.ESC
to quit,ENTER
to open file.CTRL-J
/CTRL-K
to move down/up and preview contents.CTRL-U
/CTRL-E
/CTRL-A
to switch between user/ex/all vim commands.V
/W
/P
/R
variants (visual selection, cursor word, yank text, resume last).ESC
to quit,ENTER
to feed vim command.CTRL-J
/CTRL-K
to move down/up and preview contents.CTRL-O
/CTRL-I
/CTRL-A
/CTRL-V
to switch between normal/insert/visual/all vim key mappings.V
/W
/P
/R
variants (visual selection, cursor word, yank text, resume last).ESC
to quit,ENTER
to feed vim keys.CTRL-J
/CTRL-K
to move down/up and preview contents.CTRL-U
/CTRL-R
to switch between filter/include hidden files mode.ALT-L
/ALT-H
to cd into folder and cd upper folder.V
/W
/P
/R
variants (visual selection, cursor word, yank text, resume last).ESC
to quit,ENTER
to open file, and open thetest/hello world.txt
,test/goodbye world/goodbye.lua
files.eza
/lsd
/ls
works.