From 526ab98402a7cf4ebec5c6045b29361dcadcfd77 Mon Sep 17 00:00:00 2001 From: lopy <70210066+lopi-py@users.noreply.github.com> Date: Sat, 4 Jan 2025 19:59:42 -0500 Subject: [PATCH] feat: set default capabilities on 0.11 --- lua/blink/cmp/init.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lua/blink/cmp/init.lua b/lua/blink/cmp/init.lua index af438735..778afce7 100644 --- a/lua/blink/cmp/init.lua +++ b/lua/blink/cmp/init.lua @@ -11,12 +11,15 @@ function cmp.setup(opts) opts = opts or {} - local version = vim.version() - if version.major == 0 and version.minor < 10 then + if vim.fn.has('nvim-0.10') == 0 then vim.notify('blink.cmp requires nvim 0.10 and newer', vim.log.levels.ERROR, { title = 'blink.cmp' }) return end + if vim.fn.has('nvim-0.11') == 1 then vim.lsp.config('*', { + capabilities = cmp.get_lsp_capabilities(), + }) end + local config = require('blink.cmp.config') config.merge_with(opts)