You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, when LuaSnippets are added or modified in their respective files, the internal cache of the luasnip source is not automatically cleared. This necessitates either a manual call to the API's reload function or a full Neovim restart to reflect the updated snippets. This behavior disrupts workflow and reduces usability.
LuaSnip provides the following events:
LuasnipSnippetsAdded: Triggered when snippets are added or modified.
LuasnipCleanup: Triggered when all snippets need to be cleared.
However, the cache is not automatically refreshed upon emitting these events, which prevents users from seeing updated snippets.
While related issues (#603 and #615) have discussed this problem, the existing fix still requires manual intervention or a restart, which does not fully resolve the issue.
I have addressed this issue in my fork. If you're interested, I can submit a PR with the fix.
Relevant configuration
{
'saghen/blink.cmp',
version='v0.*',
-- !Important! Make sure you're using the latest release of LuaSnip-- `main` does not work at the momentdependencies= { 'L3MON4D3/LuaSnip', version='v2.*' },
opts= {
snippets= {
expand=function(snippet) require('luasnip').lsp_expand(snippet) end,
active=function(filter)
iffilterandfilter.directionthenreturnrequire('luasnip').jumpable(filter.direction)
endreturnrequire('luasnip').in_snippet()
end,
jump=function(direction) require('luasnip').jump(direction) end,
},
sources= {
default= { 'lsp', 'path', 'luasnip', 'buffer' },
},
}
}
Make sure you have done the following
blink.cmp
Bug Description
Currently, when LuaSnippets are added or modified in their respective files, the internal cache of the
luasnip
source is not automatically cleared. This necessitates either a manual call to the API'sreload
function or a full Neovim restart to reflect the updated snippets. This behavior disrupts workflow and reduces usability.LuaSnip provides the following events:
LuasnipSnippetsAdded
: Triggered when snippets are added or modified.LuasnipCleanup
: Triggered when all snippets need to be cleared.However, the cache is not automatically refreshed upon emitting these events, which prevents users from seeing updated snippets.
While related issues (#603 and #615) have discussed this problem, the existing fix still requires manual intervention or a restart, which does not fully resolve the issue.
I have addressed this issue in my fork. If you're interested, I can submit a PR with the fix.
Relevant configuration
neovim version
v0.10.1
blink.cmp
version: branch, tag, or commitBranch: main, Commit: 07665c3
The text was updated successfully, but these errors were encountered: