diff --git a/lua/precognition/init.lua b/lua/precognition/init.lua index 2591128..054a937 100644 --- a/lua/precognition/init.lua +++ b/lua/precognition/init.lua @@ -22,7 +22,7 @@ local M = {} ---@field NextParagraph Precognition.HintOpts ---@class Precognition.Config ----@field debounce integer +---@field debounceMs integer ---@field startVisible boolean ---@field showBlankVirtLine boolean ---@field highlightColor vim.api.keyset.highlight @@ -71,7 +71,7 @@ local defaultHintConfig = { ---@type Precognition.Config local default = { - debounce = 0, + debounceMs = 0, startVisible = true, showBlankVirtLine = true, highlightColor = { link = "Comment" }, @@ -373,8 +373,8 @@ function M.show() local prev_line local draw = display_marks - if config.debounce > 0 then - local debounced = utils.debounce_trailing(display_marks, config.debounce) + if config.debounceMs > 0 then + local debounced = utils.debounce_trailing(display_marks, config.debounceMs) draw = function(...) local line = vim.api.nvim_win_get_cursor(0)[1] if line == prev_line then @@ -468,8 +468,8 @@ local state = { on_cursor_moved = function() local prev_line local draw = display_marks - if config.debounce > 0 then - local debounced = utils.debounce_trailing(display_marks, config.debounce) + if config.debounceMs > 0 then + local debounced = utils.debounce_trailing(display_marks, config.debounceMs) draw = function(...) local line = vim.api.nvim_win_get_cursor(0)[1] if line == prev_line then diff --git a/tests/precognition/e2e_spec.lua b/tests/precognition/e2e_spec.lua index a214509..53b2bc7 100644 --- a/tests/precognition/e2e_spec.lua +++ b/tests/precognition/e2e_spec.lua @@ -148,7 +148,7 @@ describe("e2e tests", function() it("supports debounce", function() precognition.setup({ - debounce = 200, + debounceMs = 200, }) local buffer = vim.api.nvim_create_buf(true, false)