-
-
Notifications
You must be signed in to change notification settings - Fork 257
Migrating from UltiSnips
Hans Chen edited this page Feb 14, 2023
·
7 revisions
This page collects various tips for UltiSnips who want to quickly migrate to LuaSnip. The aim is to have all the relevant information in the same place, so that UltiSnips users can quickly get started with LuaSnip. More advanced features of LuaSnip, such as Lua snippets, are not covered.
- Evaluation using backticks (``) (DOC/LOADERS)
Install the plugin following the README.
To load snippets in a format similar to UltiSnips' snippets, you want to use the SnipMate-like loader:
require("luasnip.loaders.from_snipmate").lazy_load()
By default, the snippets should be placed in a directory named snippets
in your runtimepath
(see :help runtimepath
).
You can also specify a custom path:
require("luasnip.loaders.from_snipmate").lazy_load( paths = { "./my-snippets" } })
Here ./
specifies a path relative to $MYVIMRC
.
See DOC/LOADERS for more information.