summaryrefslogtreecommitdiff
path: root/lua/99/extensions/init.lua
diff options
context:
space:
mode:
authorBogdan Nikolov <84232456+0xr3ngar@users.noreply.github.com>2026-02-19 20:30:08 +0100
committerGitHub <noreply@github.com>2026-02-19 20:30:08 +0100
commit725bf38ffc08cb8b537cbff322ef2d889b197dad (patch)
tree2fa53c6b40463b8a18d9e175617b9b413a844e70 /lua/99/extensions/init.lua
parent6d219f47aa29cafb1ec39c41d4dd0a4875a74506 (diff)
parentd34e4dcbcc1f95d8f31f851baad18da12c59e7df (diff)
downloada4-725bf38ffc08cb8b537cbff322ef2d889b197dad.tar.xz
a4-725bf38ffc08cb8b537cbff322ef2d889b197dad.zip
Merge branch 'master' into master
Diffstat (limited to 'lua/99/extensions/init.lua')
-rw-r--r--lua/99/extensions/init.lua28
1 files changed, 27 insertions, 1 deletions
diff --git a/lua/99/extensions/init.lua b/lua/99/extensions/init.lua
index 95629a2..6aae2bb 100644
--- a/lua/99/extensions/init.lua
+++ b/lua/99/extensions/init.lua
@@ -13,7 +13,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