feat: add blink.cmp completion

This commit is contained in:
Radu C. Martin 2024-12-18 17:24:15 +01:00
parent b0022861cb
commit 1c2819acf4
3 changed files with 52 additions and 140 deletions

View file

@ -26,8 +26,8 @@ return {
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
{ 'j-hui/fidget.nvim', opts = {} },
-- Allows extra capabilities provided by nvim-cmp
'hrsh7th/cmp-nvim-lsp',
-- Autocomplete. Load in case it wasn't loaded elsewhere
'saghen/blink.cmp',
},
config = function()
-- Brief aside: **What is LSP?**
@ -165,7 +165,7 @@ return {
-- When you add nvim-cmp, luasnip, etc. Neovim now has *more* capabilities.
-- So, we create new capabilities with nvim cmp, and then broadcast that to the servers.
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = vim.tbl_deep_extend('force', capabilities, require('cmp_nvim_lsp').default_capabilities())
capabilities = vim.tbl_deep_extend('force', capabilities, require('blink.cmp').get_lsp_capabilities())
-- Enable the following language servers
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed.