Skip to content

Commit a197f75

Browse files
committed
feat: config option for ui throttle
1 parent 0cff878 commit a197f75

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lua/lazy/core/config.lua

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ M.defaults = {
3737
-- defaults for `Lazy log`
3838
log = { "-10" }, -- last 10 commits
3939
-- log = { "--since=3 days ago" }, -- commits from the last 3 days
40+
throttle = 20, -- how frequently should the ui process render events
4041
},
4142
}
4243

lua/lazy/view/init.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ function M.show(mode)
9898
})
9999

100100
local render = Render.new(buf, win, 2)
101-
local update = Util.throttle(30, function()
101+
local update = Util.throttle(Config.options.ui.throttle, function()
102102
if buf and vim.api.nvim_buf_is_valid(buf) then
103103
vim.bo[buf].modifiable = true
104104
render:update()

0 commit comments

Comments
 (0)