Skip to content

Commit

Permalink
docs: add note about timeout for LSPs
Browse files Browse the repository at this point in the history
  • Loading branch information
Saghen committed Dec 30, 2024
1 parent 86a13ae commit 26bcbc8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lua/blink/cmp/sources/lsp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ function lsp:get_completions(context, callback)
vim.lsp.get_clients({ bufnr = 0, method = 'textDocument/completion' })
)

-- TODO: implement a timeout before returning the menu as-is. In the future, it would be neat
-- to detect slow LSPs and consistently run them async
local task = async.task
.await_all(vim.tbl_map(function(client) return completion_lib.get_completion_for_client(client, context) end, clients))
:map(function(responses)
Expand Down

0 comments on commit 26bcbc8

Please sign in to comment.