refactor(cmp): replace nvim-cmp with blink.cmp#1568
Conversation
There was a problem hiding this comment.
Pull request overview
This PR migrates the Neovim completion stack from nvim-cmp + wilder.nvim to saghen/blink.cmp, and updates related integrations (LSP capabilities, Copilot, and theme integration) to match the new completion engine.
Changes:
- Replace
hrsh7th/nvim-cmpconfiguration withsaghen/blink.cmp(including cmdline completion) and addblink.compat+blink-copilotintegration. - Update LSP capability wiring to use
blink.cmpcapabilities. - Remove
wilder.nvimandcopilot-cmpplugin/config and adjust Catppuccin integration toblink_cmp.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| lua/modules/plugins/tool.lua | Removes wilder.nvim from tool plugins list. |
| lua/modules/plugins/completion.lua | Swaps nvim-cmp for blink.cmp and adjusts dependencies (incl. Copilot integration). |
| lua/modules/configs/ui/catppuccin.lua | Updates Catppuccin integration flag from cmp to blink_cmp. |
| lua/modules/configs/tool/wilder.lua | Deletes wilder configuration (cmdline completion moved to blink). |
| lua/modules/configs/completion/mason-lspconfig.lua | Switches LSP capabilities source to blink.cmp. |
| lua/modules/configs/completion/lsp.lua | Switches non-mason LSP capabilities source to blink.cmp. |
| lua/modules/configs/completion/copilot.lua | Disables Copilot’s cmp integration to avoid conflicts with blink-based completion. |
| lua/modules/configs/completion/copilot-cmp.lua | Removes copilot-cmp configuration. |
| lua/modules/configs/completion/cmp.lua | Removes nvim-cmp configuration. |
| lua/modules/configs/completion/blink.lua | Adds blink.cmp setup (sources, keymaps, UI, cmdline). |
Comments suppressed due to low confidence (1)
lua/modules/configs/completion/copilot.lua:13
- These comments still reference
copilot-cmp, but this PR removescopilot-cmpin favor of blink integration. Please update the wording to reflect the current integration (e.g., blink-copilot) or make it generic to avoid future confusion.
-- if true, it can interfere with completions in copilot-cmp
enabled = false,
},
suggestion = {
-- if true, it can interfere with completions in copilot-cmp
enabled = false,
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| config = require("completion.cmp"), | ||
| version = "1.*", | ||
| event = { "InsertEnter", "CmdlineEnter" }, | ||
| config = require("completion.blink"), |
There was a problem hiding this comment.
opts_extend won’t have any effect here because this spec doesn’t define opts, and the config function ignores any opts passed by lazy.nvim. Either remove opts_extend, or switch to providing an opts = { ... } table and have the config function apply/merge that table so users can extend sources.default as intended.
| config = require("completion.blink"), | |
| opts = { | |
| sources = { | |
| default = {}, | |
| }, | |
| }, | |
| config = function(_, opts) | |
| require("completion.blink")(opts) | |
| end, |
There was a problem hiding this comment.
this is actually valid, as folke suggested in https://lazy.folke.io/spec

add we can also remove the lua/user related code.
but i think the cleanup and refactor itself needs another pr.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
I believe this PR can be reviewed now if you have time~ @charliie-dev |
|
port some useful personal blink.cmp config, here the ref: https://github.com/charliie-dev/nvimdots.lua/blob/main/lua/modules/configs/completion/blink.lua |
Signed-off-by: charliie-dev <mail@charliie.dev>
Signed-off-by: charliie-dev <mail@charliie.dev>
Signed-off-by: charliie-dev <mail@charliie.dev>
|
I was looking forward to this as well, as this could enable us with more options from blink.cmp dev ecosystem, also with a better flexibility for using other ai edit prediction service. |
Add icons.cmp[ctx.source_id] lookup before kind-based icon fallback so the ripgrep icon (and other source icons) renders in the menu.
|
IMO it's good enough to merge |
|
@Cloud0310 maybe the ai part can be merged until next pr |
Fine with me, yesterday I was busy doing something else. Is 0.12 already able to be the main branch now? If so, I thought we can make it default. |
This commit replace
nvim-cmpwithblink.cmp,also use blink internal cmdline to replacewilder.nvim. These changes are expected to be forward compatible.