diff --git a/OPTIONS.md b/OPTIONS.md index 5244498b..9d112ad3 100644 --- a/OPTIONS.md +++ b/OPTIONS.md @@ -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. diff --git a/README.md b/README.md index 7831984e..b23d697b 100644 --- a/README.md +++ b/README.md @@ -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, diff --git a/doc/fzf-lua-opts.txt b/doc/fzf-lua-opts.txt index b7058f96..8658dd34 100644 --- a/doc/fzf-lua-opts.txt +++ b/doc/fzf-lua-opts.txt @@ -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* @@ -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. diff --git a/lua/fzf-lua/defaults.lua b/lua/fzf-lua/defaults.lua index d0ab2f79..afd7d09d 100644 --- a/lua/fzf-lua/defaults.lua +++ b/lua/fzf-lua/defaults.lua @@ -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,