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:
Folke Lemaitre 2024-11-02 09:54:55 +01:00 committed by GitHub
parent a66b44a9fe
commit ad52bf91bc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 148 additions and 1 deletions

View file

@ -184,11 +184,13 @@ return {
local servers = opts.servers
local has_cmp, cmp_nvim_lsp = pcall(require, "cmp_nvim_lsp")
local has_blink, blink = pcall(require, "blink.cmp")
local capabilities = vim.tbl_deep_extend(
"force",
{},
vim.lsp.protocol.make_client_capabilities(),
has_cmp and cmp_nvim_lsp.default_capabilities() or {},
has_blink and blink.get_lsp_capabilities() or {},
opts.capabilities or {}
)