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 6, 2025
1 parent 51fb932 commit 220baad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 1 addition & 2 deletions lua/blink/cmp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ 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
Expand Down
5 changes: 5 additions & 0 deletions plugin/blink-cmp.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if vim.fn.has('nvim-0.11') == 1 then
vim.lsp.config('*', {
capabilities = require('blink.cmp').get_lsp_capabilities(),
})
end

0 comments on commit 220baad

Please sign in to comment.