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

[Copilot] buffer not 'buflisted' in vimagit buffer #279

Open
CheesyChocolate opened this issue Mar 4, 2024 · 2 comments
Open

[Copilot] buffer not 'buflisted' in vimagit buffer #279

CheesyChocolate opened this issue Mar 4, 2024 · 2 comments

Comments

@CheesyChocolate
Copy link

CheesyChocolate commented Mar 4, 2024

Description

I use jreybert/vimagit. I can't manage to start and attach the copilot to magit buffer.

here is my copilot config

return {
	"zbirenbaum/copilot.lua",
	config = function()
		require("copilot").setup {
			suggestion = {
				auto_trigger = true,
				keymap = {
					accept = "<C-b>",
				},
			},
			filetypes = {
				["*"] = true,
			},
		}
	end
}

here is all of my nvim config

steps to reproduce

method 1

  1. invoke vimagit by nvim -c MagitOnly
  2. no copilot, checking the status gives the following
:Copilot

[Copilot] Not Started
:Copilot attach

[Copilot] buffer not 'buflisted'
[Copilot] to force attach, run ':Copilot! attach'

force attaching the copilot brings it online and it works.

method 2

  1. inside an existing neovim buffer that has Copilot online, open a new vimagit buffer with :Magit
  2. copilot not attached, checking the status
:Copilot

[Copilot] Online
[Copilot] Disabled (buffer not 'buflisted')

Question

My real question is how to connect the copilot to a buffer that is not bufflisted. (I mean automatically)
do I need to make an autocmd?

I'm aware the correct set of action would be to do :set buflisted then :Copilot attach. but I'm
curious for a method to just attach the Copilot to any buffer.

@ctretyak
Copy link

ctretyak commented Jul 9, 2024

At NeogitCommitMessage buffers too

@pidgeon777
Copy link

Is there a way to run copilot also on buffers not buflisted?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants