diff --git a/runtime/lua/vim/lsp/codelens.lua b/runtime/lua/vim/lsp/codelens.lua index 66d7a0cab4..f84aa748f9 100644 --- a/runtime/lua/vim/lsp/codelens.lua +++ b/runtime/lua/vim/lsp/codelens.lua @@ -484,10 +484,13 @@ function M.on_refresh(err, _, ctx) for bufnr, provider in pairs(Provider.active) do for client_id in pairs(provider.client_state) do if client_id == ctx.client_id then - provider:request(client_id, function() - provider.row_version = {} - vim.api.nvim__redraw({ buf = bufnr, valid = true, flush = false }) - end) + -- Do nothing if a request is already scheduled. + if not provider.timer then + provider:request(client_id, function() + provider.row_version = {} + vim.api.nvim__redraw({ buf = bufnr, valid = true, flush = false }) + end) + end end end end