Skip to content

Conversation

nicolastemciuc
Copy link
Member

@nicolastemciuc nicolastemciuc commented Sep 22, 2025

What?

Replaced the copilot.vim plugin with copilot.lua, which provides tighter integration with the completion engine. Completions are now enabled by default.

Why?

copilot.vim lacks proper integration with completion engines, making it harder to use alongside tools like nvim-cmp. Switching to copilot.lua resolves this limitation.

References

Comment on lines 115 to 148
sorting = {
priority_weight = 2,
comparators = {
require("copilot_cmp.comparators").prioritize,

-- Below is the default comparitor list and order for nvim-cmp
cmp.config.compare.offset,
-- cmp.config.compare.scopes, --this is commented in nvim-cmp too
cmp.config.compare.exact,
cmp.config.compare.score,
cmp.config.compare.recently_used,
cmp.config.compare.locality,
cmp.config.compare.kind,
cmp.config.compare.sort_text,
cmp.config.compare.length,
cmp.config.compare.order,
},
},
})
cmp.setup({
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
},
mapping = {
["<CR>"] = vim.schedule_wrap(function(fallback)
if cmp.visible() and has_words_before() then
cmp.select_next_item({ behavior = cmp.SelectBehavior.Select })
else
fallback()
end
end),
},
})
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity: what is this for?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They come from these configs:

@santiagorodriguez96
Copy link
Collaborator

I'm on board with migrating from copilot.vim to copilot.lua – however, the integration with the completion seems like a different feature to me that I'm not so sure about...

For start, I'm not able to get copilot suggestions until I start to type, which is not ideal IMO. What's more, it seems that all the suggestions that I get now are one-liners 🤔 Does that happen to you?

I will continue using if for a couple more days though to see how I feel, but those are my first impressions

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

Successfully merging this pull request may close these issues.

2 participants