zbirenbaum / zbirenbaum/copilot.lua

Blink and NES overlapping

Open
#618 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lua
Stars
4.1k
Forks
161
Avg merge
11h 54m
Merged PRs (30d)
13

Description

I've been using copilot.lua with suggestion = false for ages. I like when the copilot suggestion popups only in the blink completion menu as one of the items, and not as the ghost text that suggests the edit (via fang2hou/blink-copilot).

Having said that, I've been meaning to experiment with NES, and I can't seem to figure out how to get it not to conflict with blink. Currently if I enable NES, I'm getting both the copilot suggestion in cmp and the diff text from copilotlsp-nvim:

Image

What I'd like to have is:

if insert_mode:
    copilot_in_blink_cmp
elif normal_mode:
    nes_suggestion

any tips on how to configure it? My current conf below:

return {
    "zbirenbaum/copilot.lua",
    commit = "a064570939f23ef155698654c98c81e0fc2dc54a",
    event = "LspAttach",
    dependencies = {
        { "fang2hou/blink-copilot", commit = "7ad8209b2f880a2840c94cdcd80ab4dc511d4f39" },
        {
            "copilotlsp-nvim/copilot-lsp",
            init = function()
                vim.g.copilot_nes_debounce = 500
            end,
        },
    },
    cmd = "Copilot",
    config = function()
        require("copilot").setup({
            copilot_model = "gpt-4o-copilot",
            panel = { enabled = false },
            suggestion = { enabled = false },
            filetypes = {
                tex = false,
            },
            nes = {
                enabled = true,
                keymap = {
                    accept_and_goto = "<C-i>",
                    accept = false,
                    dismiss = "<Esc>",
                },
            },
        })
    end,
}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Begin with the posted copilot.lua setup and its blink-copilot and copilot-lsp dependencies; inspect how suggestion=false and nes.enabled=true behave in insert and normal modes. Reproduce the overlap, then verify that Copilot completion appears only in insert mode and NES suggestions only in normal mode.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, neovim
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.