Skip to content

Commit

Permalink
feat(previewer): default debounce delay reduced to 20ms
Browse files Browse the repository at this point in the history
  • Loading branch information
ibhagwan committed Dec 18, 2024
1 parent 0527d79 commit 9ab9d38
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion OPTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ Callback after the creation of the fzf-lua main terminal window.

#### globals.winopts.preview.delay

Type: `number`, Default: `100`
Type: `number`, Default: `20`

Debounce time (milliseconds) for displaying the preview buffer in the builtin previewer.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ require'fzf-lua'.setup {
-- border: in-border "block" marker
scrolloff = '-2', -- float scrollbar offset from right
-- applies only when scrollbar = 'float'
delay = 100, -- delay(ms) displaying the preview
delay = 20, -- delay(ms) displaying the preview
-- prevents lag on fast scrolling
winopts = { -- builtin previewer window options
number = true,
Expand Down
4 changes: 2 additions & 2 deletions doc/fzf-lua-opts.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*fzf-lua-opts.txt* For Neovim >= 0.8.0 Last change: 2024 December 16
*fzf-lua-opts.txt* For Neovim >= 0.8.0 Last change: 2024 December 17

==============================================================================
Table of Contents *fzf-lua-opts-table-of-contents*
Expand Down Expand Up @@ -373,7 +373,7 @@ Callback after the creation of the fzf-lua main terminal window.

globals.winopts.preview.delay *fzf-lua-opts-globals.winopts.preview.delay*

Type: `number`, Default: `100`
Type: `number`, Default: `20`

Debounce time (milliseconds) for displaying the preview buffer in the builtin
previewer.
Expand Down
4 changes: 2 additions & 2 deletions lua/fzf-lua/defaults.lua
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ M.defaults = {
title_pos = "center",
scrollbar = "border",
scrolloff = "-2",
-- default preview delay 100ms, same as native fzf preview
-- default preview delay, fzf native previewers has a 100ms delay:
-- https://github.com/junegunn/fzf/issues/2417#issuecomment-809886535
delay = 100,
delay = 20,
winopts = {
number = true,
relativenumber = false,
Expand Down

0 comments on commit 9ab9d38

Please sign in to comment.