Skip to content

refactor(cmp): replace nvim-cmp with blink.cmp#1568

Merged
charliie-dev merged 12 commits into
0.12from
refactor/blink.cmp
May 8, 2026
Merged

refactor(cmp): replace nvim-cmp with blink.cmp#1568
charliie-dev merged 12 commits into
0.12from
refactor/blink.cmp

Conversation

@ayamir
Copy link
Copy Markdown
Owner

@ayamir ayamir commented Apr 23, 2026

This commit replace nvim-cmp with blink.cmp, also use blink internal cmdline to replace wilder.nvim. These changes are expected to be forward compatible.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-cmp configuration with saghen/blink.cmp (including cmdline completion) and add blink.compat + blink-copilot integration.
  • Update LSP capability wiring to use blink.cmp capabilities.
  • Remove wilder.nvim and copilot-cmp plugin/config and adjust Catppuccin integration to blink_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 removes copilot-cmp in 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.

Comment thread lua/modules/configs/completion/lsp.lua
Comment thread lua/modules/configs/completion/mason-lspconfig.lua
Comment thread lua/modules/plugins/completion.lua Outdated
config = require("completion.cmp"),
version = "1.*",
event = { "InsertEnter", "CmdlineEnter" },
config = require("completion.blink"),
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
config = require("completion.blink"),
opts = {
sources = {
default = {},
},
},
config = function(_, opts)
require("completion.blink")(opts)
end,

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is actually valid, as folke suggested in https://lazy.folke.io/spec
image
add we can also remove the lua/user related code.
but i think the cleanup and refactor itself needs another pr.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread lua/modules/configs/completion/mason-lspconfig.lua Outdated
Comment thread lua/modules/configs/completion/lsp.lua Outdated
@ayamir
Copy link
Copy Markdown
Owner Author

ayamir commented Apr 26, 2026

I believe this PR can be reviewed now if you have time~ @charliie-dev

@ayamir ayamir requested review from Jint-lzxy and misumisumi April 26, 2026 02:56
@charliie-dev
Copy link
Copy Markdown
Collaborator

charliie-dev commented Apr 27, 2026

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>
@Cloud0310
Copy link
Copy Markdown
Contributor

Cloud0310 commented May 4, 2026

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.
I would love to try refactor the code with newer choices for edit prediction, and possibily code-companion side of thing.

@ayamir
Copy link
Copy Markdown
Owner Author

ayamir commented May 8, 2026

IMO it's good enough to merge

@charliie-dev
Copy link
Copy Markdown
Collaborator

@Cloud0310 maybe the ai part can be merged until next pr

Copy link
Copy Markdown
Collaborator

@charliie-dev charliie-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@charliie-dev charliie-dev merged commit 359693a into 0.12 May 8, 2026
4 checks passed
@charliie-dev charliie-dev deleted the refactor/blink.cmp branch May 8, 2026 01:28
@Cloud0310
Copy link
Copy Markdown
Contributor

Cloud0310 commented May 8, 2026

@Cloud0310 maybe the ai part can be merged until next pr

Fine with me, yesterday I was busy doing something else.
I'll try the new 0.12 branch and make progress upon.

Is 0.12 already able to be the main branch now? If so, I thought we can make it default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants