Skip to content

Commit

Permalink
fix(copletion): blink.cmp compat (closes #1522)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibhagwan committed Nov 11, 2024
1 parent ce1e24f commit c7af01f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lua/fzf-lua/cmp_src.lua
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,14 @@ function Src:resolve(completion_item, callback)
end

function Src._register_cmdline()
local ok, cmp = pcall(require, "cmp")
local ok, cmp, config
ok, cmp = pcall(require, "cmp")
if not ok then return end
ok, config = pcall(require, "cmp.config")
if not ok then return end
cmp.register_source("FzfLua", Src)
Src._registered = true
local cmdline_cfg = require("cmp.config").cmdline
local cmdline_cfg = config.cmdline
if not cmdline_cfg or not cmdline_cfg[":"] then return end
local has_fzf_lua = false
for _, s in ipairs(cmdline_cfg[":"].sources or {}) do
Expand Down

0 comments on commit c7af01f

Please sign in to comment.