Skip to content

Blink and NES overlapping #618

@sebszyller

Description

@sebszyller

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,
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions