fix: Outdated completion item with mini.snippets (#2126)

* fix: Outdated completion item with mini.snippets

* fix: Outdated completion item with mini.snippets. Prevent completion suggestions directly after snippet expand

* fix: Outdated completion item with mini.snippets. Undo changes

* fix: Outdated completion item with mini.snippets. The cmp.resubscribe solution

---------

Co-authored-by: abeldekat <abel@nomail.com>
This commit is contained in:
abeldekat
2025-01-23 07:22:37 +00:00
committed by GitHub
parent 8c82d0bd31
commit 12509903a5
4 changed files with 57 additions and 7 deletions

View File

@@ -62,6 +62,10 @@ A recommended configuration can be found below.
" Plug 'L3MON4D3/LuaSnip'
" Plug 'saadparwaiz1/cmp_luasnip'
" For mini.snippets users.
" Plug 'echasnovski/mini.snippets'
" Plug 'abeldekat/cmp-mini-snippets'
" For snippy users.
" Plug 'dcampos/nvim-snippy'
" Plug 'dcampos/cmp-snippy'
@@ -86,6 +90,12 @@ A recommended configuration can be found below.
-- require'snippy'.expand_snippet(args.body) -- For `snippy` users.
-- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users.
-- vim.snippet.expand(args.body) -- For native neovim snippets (Neovim v0.10+)
-- For `mini.snippets` users:
-- local insert = MiniSnippets.config.expand.insert or MiniSnippets.default_insert
-- insert({ body = args.body }) -- Insert at cursor
-- cmp.resubscribe({ "TextChangedI", "TextChangedP" })
-- require("cmp.config").set_onetime({ sources = {} })
end,
},
window = {