diff --git a/nvim/m-housh/lua/user/plugin/blink.lua b/nvim/m-housh/lua/user/plugin/blink.lua index 9131dd3..cb1ca0b 100644 --- a/nvim/m-housh/lua/user/plugin/blink.lua +++ b/nvim/m-housh/lua/user/plugin/blink.lua @@ -1,29 +1,57 @@ return { - "saghen/blink.cmp", - dependencies = { - "rafamadriz/friendly-snippets", - "L3MON4D3/LuaSnip", - }, - version = "v0.7.6", - opts = { - keymap = { preset = "default" }, - snippets = { - expand = function(snippet) - require("luasnip").lsp_expand(snippet) - end, - active = function(filter) - if filter and filter.direction then - return require("luasnip").jumpable(filter.direction) - end - return require("luasnip").in_snippet() - end, - jump = function(direction) - require("luasnip").jump(direction) - end, + { + "saghen/blink.cmp", + dependencies = { + "rafamadriz/friendly-snippets", + --"L3MON4D3/LuaSnip", }, - sources = { - default = { "lsp", "path", "luasnip", "buffer" }, + version = "v0.*", + opts = { + appearance = { + use_nvim_cmp_as_default = true, + nerd_font_variant = "mono", + }, + signature = { enabled = true }, + keymap = { + preset = "default", + [""] = { "accept", "fallback" }, + [""] = { + function(cmp) + cmp.show({ providers = { "snippets" } }) + end, + }, + --[""] = { "select_prev", "fallback" }, + --[""] = { "select_next", "fallback" }, + [""] = { + function(cmp) + if cmp.snippet_active() then + return cmp.accept() + else + return cmp.select_and_accept() + end + end, + "snippet_forward", + "fallback", + }, + }, + -- snippets = { + -- expand = function(snippet) + -- require("luasnip").lsp_expand(snippet) + -- end, + -- active = function(filter) + -- if filter and filter.direction then + -- return require("luasnip").jumpable(filter.direction) + -- end + -- return require("luasnip").in_snippet() + -- end, + -- jump = function(direction) + -- require("luasnip").jump(direction) + -- end, + -- }, + sources = { + default = { "lsp", "path", "snippets", "buffer" }, + }, }, + opts_extend = { "sources.default" }, }, - opts_extend = { "sources.default" }, } diff --git a/nvim/m-housh/lua/user/plugin/luasnip.lua b/nvim/m-housh/lua/user/plugin/luasnip.lua index 2e648f1..9ee53a8 100644 --- a/nvim/m-housh/lua/user/plugin/luasnip.lua +++ b/nvim/m-housh/lua/user/plugin/luasnip.lua @@ -1,5 +1,6 @@ return { "L3MON4D3/LuaSnip", + version = "v2.*", config = function() local ls = require("luasnip") local types = require("luasnip.util.types")