From 6b5e0e3063c97b8635c574d56b3cddf8c7621dc2 Mon Sep 17 00:00:00 2001 From: abeldekat Date: Mon, 30 Dec 2024 19:41:45 +0100 Subject: [PATCH] feat: an extra for mini.snippets. Review echasnovski, expand.select does not take opts as argument --- .../plugins/extras/coding/mini-snippets.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lua/lazyvim/plugins/extras/coding/mini-snippets.lua b/lua/lazyvim/plugins/extras/coding/mini-snippets.lua index c5422189..7dc57f2f 100644 --- a/lua/lazyvim/plugins/extras/coding/mini-snippets.lua +++ b/lua/lazyvim/plugins/extras/coding/mini-snippets.lua @@ -49,25 +49,25 @@ local function expand(args) insert({ body = args.body }) -- insert at cursor end -local snippet_select_for_cmp = function(snippets, insert, opts) +local snippet_select_for_cmp = function(snippets, insert) local cmp = require("cmp") if cmp.visible() then cmp.close() end - MiniSnippets.default_select(snippets, insert, opts) + MiniSnippets.default_select(snippets, insert) end -local snippet_select_for_blink = function(snippets, insert, opts) +local snippet_select_for_blink = function(snippets, insert) -- Blink's cancel uses vim.schedule! require("blink.cmp").cancel() -- Schedule, otherwise blink's virtual text is not removed on vim.ui.select vim.schedule(function() - MiniSnippets.default_select(snippets, insert, opts) + MiniSnippets.default_select(snippets, insert) end) end -local snippet_select_without_completion_engine = function(snippets, insert, opts) - MiniSnippets.default_select(snippets, insert, opts) +local snippet_select_without_completion_engine = function(snippets, insert) + MiniSnippets.default_select(snippets, insert) end local snippet_select = snippet_select_without_completion_engine @@ -150,9 +150,9 @@ return { expand({ body = snippet }) -- provide snippet expansion for lsp end, active = function() - return false -- mini.snippets operates independently + return false -- mini.snippets operates independently, blink is closed end, - jump = function() end, -- mini.snippets operates independently + jump = function() end, -- mini.snippets operates independently, blink is closed } end, },