Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cann't setup source_id column #1321

Closed
2 tasks done
mario-amazing opened this issue Feb 26, 2025 · 2 comments
Closed
2 tasks done

Cann't setup source_id column #1321

mario-amazing opened this issue Feb 26, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@mario-amazing
Copy link

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

Cann't setup source_id
completion.menu.draw.columns = { { "label", gap = 1 }, { "kind_icon" }, {"kind" }, {"source_id" } },
With source_name -> fine!

Error:

Failed to run `config` for blink.cmp
...share/nvim/lazy/blink.cmp/lua/blink/cmp/config/utils.lua:29: completion.menu.draw.columns: expected a table of tables, where each table contains a list of components and an optional gap. List of available components: kind_icon, source_
name, provider, label, label_description, kind, got table: 0x01084ac740

Relevant configuration

sources = {
      default = { "lsp", "path", "snippets", "buffer", "copilot", "ripgrep" },
      providers = {
        copilot = {
          name = "copilot",
          module = "blink-cmp-copilot",
          score_offset = 100,
          async = true,
          transform_items = function(_, items)
            local CompletionItemKind = require("blink.cmp.types").CompletionItemKind
            local kind_idx = #CompletionItemKind + 1
            CompletionItemKind[kind_idx] = "Copilot"
            for _, item in ipairs(items) do
              item.kind = kind_idx
            end
            return items
          end,
        },
        ripgrep = {
          module = "blink-ripgrep",
          name = "Ripgrep",
          opts = {
            prefix_min_len = 3,
            context_size = 5,
            max_filesize = "1M",
            additional_rg_options = {},
          },
        },
      },
    },

neovim version

NVIM v0.10.0

blink.cmp version

main

@mario-amazing mario-amazing added the bug Something isn't working label Feb 26, 2025
@Saghen
Copy link
Owner

Saghen commented Feb 26, 2025

The error explains the issue, source_id doesnt exist but source_name does. You can use the discussion section for these

@Saghen Saghen closed this as not planned Won't fix, can't repro, duplicate, stale Feb 26, 2025
@mario-amazing
Copy link
Author

@Saghen, In the documentation, column source_id is available. Therefore I think this is a bug

Image

@Saghen Saghen reopened this Feb 26, 2025
@Saghen Saghen closed this as completed in 558c2a4 Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants