zbirenbaum / zbirenbaum/copilot.lua
Cannot get more than 1 line completion in blink.cmp menu in JS/TS files
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 4.1k
- Forks
- 161
- Avg merge
- 11h 54m
- Merged PRs (30d)
- 13
Description
In both JS and Typescript files, if I open :Copilot panel, I see multi-line suggestions, but I never see them in my cmp list. Does not happen in Python. I was experiencing this both with hrsh7th/nvim-cmp and now with blink.cmp
Nvim v0.11.3
copilot.lua e73fe7c
blink.cmp v1.6.0
JS/TS cmp
JS/TS panel
Python cmp
return {
"zbirenbaum/copilot.lua",
cmd = "Copilot",
event = "InsertEnter",
config = function()
require("copilot").setup({
suggestion = { enabled = false },
panel = { enabled = false },
})
end,
}
return {
"saghen/blink.cmp",
dependencies = {
"rafamadriz/friendly-snippets",
"brenoprata10/nvim-highlight-colors",
"zbirenbaum/copilot.lua",
"fang2hou/blink-copilot",
},
version = "1.*",
opts = {
keymap = { preset = "super-tab" },
appearance = {
nerd_font_variant = "mono",
},
completion = {
documentation = { auto_show = true },
menu = {
draw = {
components = {
-- customize the drawing of kind icons
kind_icon = {
text = function(ctx)
-- default kind icon
local icon = ctx.kind_icon
-- if LSP source, check for color derived from documentation
if ctx.item.source_name == "LSP" then
local color_item =
require("nvim-highlight-colors").format(ctx.item.documentation, { kind = ctx.kind })
if color_item and color_item.abbr ~= "" then
icon = color_item.abbr
end
end
return icon .. ctx.icon_gap
end,
highlight = function(ctx)
-- default highlight group
local highlight = "BlinkCmpKind" .. ctx.kind
-- if LSP source, check for color derived from documentation
if ctx.item.source_name == "LSP" then
local color_item =
require("nvim-highlight-colors").format(ctx.item.documentation, { kind = ctx.kind })
if color_item and color_item.abbr_hl_group then
highlight = color_item.abbr_hl_group
end
end
return highlight
end,
},
},
},
},
},
sources = {
default = { "lsp", "path", "snippets", "buffer", "copilot" },
providers = {
copilot = {
name = "copilot",
module = "blink-copilot",
score_offset = 100,
async = true,
},
},
},
fuzzy = { implementation = "prefer_rust_with_warning" },
},
opts_extend = { "sources.default" },
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the provided blink.cmp, blink-copilot, and copilot.lua configuration in JavaScript, TypeScript, and Python files. Compare the completion data returned to the cmp menu with the multi-line suggestions shown by :Copilot panel. Done means multi-line Copilot completions appear correctly in the completion menu for JS/TS without regressing Python behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, lua, typescript
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100