Skip to content

Clangd #include snippet completion result in extra brackets or qoutes #1989

@memchr

Description

@memchr

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

Selecting a completion result for the #include <> or #include "" snippet of clangd results in an additional closing angle bracket or qoute being inserted. For example, typing #include <stdio|> and confirming the candidate stdio.h leads to the output #include <stdio.h>>, with an extra closing bracket erroneously added.

asciicast

Relevant configuration

vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()
require("lazy.minit").repro({
  spec = {
    {
      "saghen/blink.cmp",
      build = "cargo build --release",
      opts = {},
    },
  },
})

vim.lsp.config("clangd", {
  cmd = { "clangd" },
  filetypes = { "c", "cpp" },
})
vim.lsp.enable("clangd")

neovim version

v0.12.0-dev-813+g73fbc693b5

blink.cmp version

02ee0a1

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