Skip to content

Commit

Permalink
fix(blink-cmp): check for the existence of lazydev blink integratio…
Browse files Browse the repository at this point in the history
…n support
  • Loading branch information
mehalter committed Nov 8, 2024
1 parent 580686c commit 2e2784a
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions lua/astrocommunity/completion/blink-cmp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,21 @@ return {
specs = {
{
"Saghen/blink.cmp",
opts = {
sources = {
-- add lazydev to your completion providers
completion = { enabled_providers = { "lazydev" } },
providers = {
-- dont show LuaLS require statements when lazydev has items
lsp = { fallback_for = { "lazydev" } },
lazydev = { name = "LazyDev", module = "lazydev.integrations.blink" },
},
},
},
opts = function(_, opts)
if pcall(require, "lazydev.integrations.blink") then
return require("astrocore").extend_tbl(opts, {
sources = {
-- add lazydev to your completion providers
completion = { enabled_providers = { "lazydev" } },
providers = {
-- dont show LuaLS require statements when lazydev has items
lsp = { fallback_for = { "lazydev" } },
lazydev = { name = "LazyDev", module = "lazydev.integrations.blink" },
},
},
})
end
end,
},
},
},
Expand Down

0 comments on commit 2e2784a

Please sign in to comment.