mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-22 00:49:03 +02:00
feat(extras): blink (#4680)
## Description Extra to use [blink.cmp](https://github.com/Saghen/blink.cmp) instead of **nvim-cmp**. ## Todo - [x] tokyonight suport - [x] basic integration - [ ] check / update all cmp sources - [ ] copilot and others integration - [x] native lazydev source ## Limitations There's no copilot source, so instead when enabling both blink and copilot: - blink ghost text is disabled - copilot suggestions are enabled - use `<tab>` to navigate snippets and accept copilot completions ## Related Issue(s) - https://github.com/LazyVim/LazyVim/discussions/4679
This commit is contained in:
parent
a66b44a9fe
commit
ad52bf91bc
5 changed files with 148 additions and 1 deletions
|
@ -80,4 +80,44 @@ return {
|
|||
})
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"saghen/blink.cmp",
|
||||
optional = true,
|
||||
specs = {
|
||||
{
|
||||
"zbirenbaum/copilot.lua",
|
||||
event = "InsertEnter",
|
||||
opts = {
|
||||
suggestion = {
|
||||
enabled = true,
|
||||
auto_trigger = true,
|
||||
keymap = { accept = false },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
windows = {
|
||||
ghost_text = {
|
||||
enabled = false,
|
||||
},
|
||||
},
|
||||
keymap = {
|
||||
["<Tab>"] = {
|
||||
function(cmp)
|
||||
if cmp.is_in_snippet() then
|
||||
return cmp.accept()
|
||||
elseif require("copilot.suggestion").is_visible() then
|
||||
require("copilot.suggestion").accept()
|
||||
else
|
||||
return cmp.select_and_accept()
|
||||
end
|
||||
end,
|
||||
"snippet_forward",
|
||||
"fallback",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue