diff --git a/.luarc.json b/.luarc.json index 3826102..4fee847 100644 --- a/.luarc.json +++ b/.luarc.json @@ -6,10 +6,10 @@ "type": { "checkTableShape": true }, - "diagnostics.globals": [ - "describe", - "it", - "before_each", - "after_each" - ] + "diagnostics.globals": [ + "describe", + "it", + "before_each", + "after_each" + ] } diff --git a/lua/precognition/init.lua b/lua/precognition/init.lua index f76da0b..bff495e 100644 --- a/lua/precognition/init.lua +++ b/lua/precognition/init.lua @@ -396,7 +396,7 @@ function M.show() local prev_line local draw = display_marks if config.debounceMs > 0 then - local debounced = utils.debounce_trailing(display_marks, config.debounceMs) + local debounced = require("precognition.utils").debounce_trailing(display_marks, config.debounceMs) draw = function(...) local line = vim.api.nvim_win_get_cursor(0)[1] if line == prev_line then @@ -502,7 +502,7 @@ local state = { local prev_line local draw = display_marks if config.debounceMs > 0 then - local debounced = utils.debounce_trailing(display_marks, config.debounceMs) + local debounced = require("precognition.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 56f3eb3..c13650a 100644 --- a/tests/precognition/e2e_spec.lua +++ b/tests/precognition/e2e_spec.lua @@ -139,6 +139,7 @@ describe("e2e tests", function() precognition.on_cursor_moved() + ---@diagnostic disable-next-line: undefined-field assert.is_nil(precognition.extmark) eq( @@ -153,6 +154,7 @@ describe("e2e tests", function() coroutine.resume(co) end, 210)) + ---@diagnostic disable-next-line: undefined-field assert.not_nil(precognition.extmark) local extmarks = vim.api.nvim_buf_get_extmark_by_id(buffer, precognition.ns, precognition.extmark, {