From b395ea8274349085306d0586ef865e7a38834d74 Mon Sep 17 00:00:00 2001 From: Huynh Duc Dung Date: Wed, 4 Feb 2026 23:29:39 +0800 Subject: feat: add blink.cmp as completion source option - Add "blink" to completion source type - Wrap cmp require with pcall for graceful fallback - Show helpful error if blink.compat is missing - Update README with blink.cmp documentation --- lua/99/extensions/init.lua | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'lua/99/extensions/init.lua') diff --git a/lua/99/extensions/init.lua b/lua/99/extensions/init.lua index debc1a8..e379871 100644 --- a/lua/99/extensions/init.lua +++ b/lua/99/extensions/init.lua @@ -11,7 +11,33 @@ local function get_source(completion) end local source = completion.source if source == "cmp" then - local cmp = require("99.extensions.cmp") + local ok, cmp = pcall(require, "99.extensions.cmp") + if not ok then + vim.notify( + '[99] nvim-cmp is not installed. Install hrsh7th/nvim-cmp or use source = "blink"', + vim.log.levels.WARN + ) + return + end + return cmp + end + if source == "blink" then + local ok, _ = pcall(require, "blink.compat") + if not ok then + vim.notify( + "[99] blink.compat is required for blink source. Install: { 'saghen/blink.compat', version = '2.*' }", + vim.log.levels.ERROR + ) + return + end + local cmp_ok, cmp = pcall(require, "99.extensions.cmp") + if not cmp_ok then + vim.notify( + "[99] 99 completion module failed to load", + vim.log.levels.ERROR + ) + return + end return cmp end end -- cgit v1.3-3-g829e