Closed ms-jpq closed 2 years ago
here is a quick job on getting copilot to co-exist with coq
, just got into tech preview today and will take more time to get it to work better.
It's really not ideal, right now to accept co-pilot suggestions, its an additional hotkey. Since I just got the invite to the tech preview this afternoon, I havn't figured out how to do this more elegantly, but its better than nothing. the idea is that you can just use this, and by the time i figure it out, you can just update the git repo and everything will be done better.
Im trying this out, the only issue I am running into is that if there are completion suggestions as well as a co-pilot suggestion, the co-pilot suggestion disappears after like 0.1 seconds, basically just flickers. If there are no completion suggestions, the co-pilot feature works as intended. Thanks!
@aprowe disabling fast_close should help. My understanding is that when the pum window is closed and reopened it re-renders the screen and hides the ghost text:
vim.g.coq_settings = {
auto_start = true,
display = {
pum = {
fast_close = false
}
}
}
@kyrisu does this work for you still? for me adding your suggested settings to my init.lua doesn't help - still just flickers. @ms-jpq - again thanks a ton for this, you're a legend. any suggestions on the flicker though?
@yingzhu146 I'm actually experiencing the same as @aprowe - with no completion suggestions copilot works as expected with then it disappears.
yep same here!
I'm also experiencing the same issue with the ghost text flickering, would love some suggestions @ms-jpq. Thanks for the amazing work!
I made some updates a few days ago and it should work better now.
The issue remains that copilot
is very slow compared to other completion sources and the interm solution is just to add an accept
key as normal and in cases where copilot
responds fast enough, it will show up in the suggestions menu.
which should be pretty similar to how VScode does it or something.
Not sure if I'm doing anything wrong but ghost text for copilot still flickers
Here's my config:
-- coq settings
vim.g.coq_settings = {
auto_start = 'shut-up',
clients = {
tabnine = {
enabled = true,
},
},
keymap = {
recommended = false,
jump_to_mark = '<c-e>',
},
}
local lspconfig = require'lspconfig'
local coq = require'coq'
local coq_3p = require'coq_3p'
local lspinstall = require'nvim-lsp-installer'
-- Snippet support
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.textDocument.completion.completionItem.snippetSupport = true
-- Loops through installed LSPs
lspinstall.on_server_ready(function(server)
local config = {
capabilities = capabilities,
flags = { debounce_text_changes = 500 },
on_attach = function(client)
client.resolved_capabilities.document_formatting = false
client.resolved_capabilities.document_range_formatting = false
end,
}
server:setup(coq.lsp_ensure_capabilities(config))
end)
coq_3p{
{ src = 'copilot', short_name = 'COP', accept_key = '<C-f>' },
}
my config is init not lua how should that to work with copilot for now if i active coq copilot not show any suggestion
For me copilot suggestions are always there, but when i open the coq_menu they go away but its very annoying because they always cover my code
https://github.com/ms-jpq/coq.thirdparty