Is there a way to disable auto lazy-loading from vs code snippets? #1381
-
tldr; is there currently a way to explicitly not lazy load a vs code snippets library? I'm in the process of migrating from vs code and currently have an extension which provides snippets for tex documents (LaTeX-Workshop for context). Seemingly these are automatically lazy loaded seemingly without any configuration suggesting that this should happen. Here's my current lazy vim configuration return {
"L3MON4D3/LuaSnip",
-- follow latest release.
version = "v2.*",
build = "make install_jsregexp",
init = function()
require('luasnip').log.set_loglevel("debug")
--Attempting to decrease priority/not load the library. Added after the conflicting snippets source was found
require('luasnip.loaders.from_vscode').lazy_load({
lazy_paths = nil,
exclude = { "tex"},
override_priority = 100,
default_priority = 100
})
require('luasnip.loaders.from_lua').lazy_load({paths = {vim.fn.stdpath("config")..'/LuaSnip/'}})
end,
opts = {
update_events = {"TextChanged", "TextChangedI"},
enable_autosnippets = true,
}
} As far as I know this configuration should exclude "tex" snippets from loading. Among other attempts at not loading these specific libraries. (priorty only affects when things are manually expanded as mentioned in #458 ). However, when working on a tex document the snippets available in the vs code library are automatically loaded. I know this because the snippets conflict with another commonly used snippet for me and I have the following in the logs
The last line suggests to me that something is being loaded but what isn't specified for some unknown reason. I think something like this was brought up in #589 but was not very conclusive from what I could tell. It also occurs even if I don't have the vs Is there some way that I can disable the auto lazy-loading of the vs code snippets? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Mhmm, luasnip is actually precise in this case, if a loader loads something, all snippets are listed in the log. The "vscode-loader: Loading lazy-load-snippets for filetype
|
Beta Was this translation helpful? Give feedback.
-
Thanks for pointing out the |
Beta Was this translation helpful? Give feedback.
Mhmm, luasnip is actually precise in this case, if a loader loads something, all snippets are listed in the log. The "vscode-loader: Loading lazy-load-snippets for filetype
tex
" message can be understood like "checking if there are lazy-load snippets for the filetype tex present".:LuaSnipListAvailable
)loaders_store_source
inls.setup
, expand one of the undesired snippets, and runrequire("luasnip.extras.snip_location").jump_to_active_snippet()
? That should take you to …