Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
2.2.0 source code.tar.gz | 2023-12-31 | 316.4 kB | |
2.2.0 source code.zip | 2023-12-31 | 389.4 kB | |
README.md | 2023-12-31 | 2.5 kB | |
Totals: 3 Items | 708.3 kB | 0 |
Highlights
Overhaul of vscode/snipmate/lua-loaders
The implementation of the loaders was greatly refactored, and there are a few new features:
* We can now reload files when they are updated in another neovim-instance/in some other editor (via libuv).
This can be enabled by passing fs_event_providers = {libuv=true}
to the load
-call, like so
:::lua
require("luasnip.loaders.from_lua").lazy_load({paths = "./luasnippets", fs_event_providers = {libuv=true}})
- Files that are created after the load-call will be loaded (which was not the case previously)
-
Similarly to the above, it is also possible to "register" a snippet-collection for loading as soon as it is created. To enable this for some collection, pass it to the
lazy_paths
-key inload
::::lua require("luasnip.loaders.from_lua").load({lazy_paths = ".luasnippets"}) (this example is especially useful since it will load a snippet-collection in the current directory, which could be a project-specific one) * The lua-loader may define dependencies on files, such that the snippet-files that depend on some file will be reloaded when the file is edited. Load a file via
ls_tracked_dofile
or a package vials_tracked_dopackage
to make use of this.
All of these features are also documented in DOC.md
, take a look for more details.
What's Changed
- Use libuv-file-watcher to update loaded snippet-collections. by @L3MON4D3 in https://github.com/L3MON4D3/LuaSnip/pull/1033
- add option to skip indent nodes by @TwIStOy in https://github.com/L3MON4D3/LuaSnip/pull/1072
- feat(builtin): support vscode snippet variable CURRENT_TIMEZONE_OFFSET by @masakichi in https://github.com/L3MON4D3/LuaSnip/pull/1091
- Minor DOC.md modifications for panvimdoc lists by @Ote-Leo in https://github.com/L3MON4D3/LuaSnip/pull/1097
- Add quotes to jsregexp make commands by @louis-vs in https://github.com/L3MON4D3/LuaSnip/pull/1099
New Contributors
- @masakichi made their first contribution in https://github.com/L3MON4D3/LuaSnip/pull/1091
- @Ote-Leo made their first contribution in https://github.com/L3MON4D3/LuaSnip/pull/1097
- @louis-vs made their first contribution in https://github.com/L3MON4D3/LuaSnip/pull/1099
A hearty Thank You! to all contributors :)
Full Changelog: https://github.com/L3MON4D3/LuaSnip/compare/v2.1.1...v2.2.0