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 passingfs_event_providers = {libuv=true}
to theload
-call, like so
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 thelazy_paths
-key inload
:
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 #1033
- add option to skip indent nodes by @TwIStOy in #1072
- feat(builtin): support vscode snippet variable CURRENT_TIMEZONE_OFFSET by @masakichi in #1091
- Minor DOC.md modifications for panvimdoc lists by @Ote-Leo in #1097
- Add quotes to jsregexp make commands by @louis-vs in #1099
New Contributors
- @masakichi made their first contribution in #1091
- @Ote-Leo made their first contribution in #1097
- @louis-vs made their first contribution in #1099
A hearty Thank You! to all contributors :)
Full Changelog: v2.1.1...v2.2.0