Skip to content

Commit

Permalink
feat: set default capabilities on 0.11
Browse files Browse the repository at this point in the history
  • Loading branch information
lopi-py committed Jan 5, 2025
1 parent 51fb932 commit 526ab98
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lua/blink/cmp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 526ab98

Please sign in to comment.