Skip to content

Usage with rust-analyzer deletes trailing characters when accepting a completion #1736

@lazkindness

Description

@lazkindness

Make sure you have done the following

  • Updated to the latest version of blink.cmp
  • Searched for existing issues and documentation (try <C-k> on https://cmp.saghen.dev)

Bug Description

Screen.Recording.2025-05-05.at.11.54.07.AM.mov

When using blink with Rust, I noticed that accepting completions frequently deletes trailing characters. Sometimes it's a lot (like all characters after the completion), and sometimes it's a couple like you can see in the video. Sometimes it doesn't do it at all. I wish I had more information to explain when it does / doesn't happen, but it seems fairly random to me?

Also worth noting, this doesn't happen when I am just scrolling through the list; only when I actually accept a completion from the list. I do not use any kind of auto pair / auto insertion plugin which I thought may have something to do with this.

Relevant configuration

return {
	"saghen/blink.cmp",
	dependencies = {
		"fang2hou/blink-copilot",
		"Kaiser-Yang/blink-cmp-avante",
	},
	version = "1.*",
	opts = {
		keymap = { preset = "super-tab" },
		appearance = {
			nerd_font_variant = "mono",
		},
		completion = {
			menu = { border = "single" },
			documentation = { auto_show = true, window = { border = "single" } },
			trigger = {
				show_in_snippet = false,
			},
			list = {
				selection = { preselect = false },
			},
		},
		signature = { window = { border = "single" } },
		sources = {
			default = { "avante", "copilot", "lsp", "path", "snippets", "buffer" },
			providers = {
				copilot = {
					name = "copilot",
					module = "blink-copilot",
					score_offset = 100,
					async = true,
				},
				avante = {
					module = "blink-cmp-avante",
					name = "Avante",
					opts = {
						icons = false,
					},
				},
			},
		},
	},
}

neovim version

0.11.1

blink.cmp version

1.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions