-
Notifications
You must be signed in to change notification settings - Fork 21
How to use community snippets add and add personal snippets #17
Comments
I did some tests and they are expanding as intended in my tests, let me know if adding the lazy_load fix this for you as well. |
Yes, the vscode json friendly snippets are working with the configuration describe above. Thank you. I would also like to have a I updated the
I have tried a few variations around the original lua code but without success
Update: I noted if I do specify a path, then the friendly snippets are no longer being loaded (this is to be expected from the paths paramter). If I mistakenly use path then the parameter is ignored and friendly snippets are loaded. So passing paths does seem to have an effect but I seem to be passing a value for the path that is not found. I also tried a full path, but it still fails to find my own snippets.
Looking at the Luasnip code, lazy_load (and other load functions) calls |
Looking at the
So for local snippets I need to create a
|
Cool so is working now? We can create a session in the readme with the lessons we learned in this issue :) |
Success (sort of). Adding the packages.json file guided Luasnip to the location of the actual snippets... So in summary
The only down-side of adding a path is that friendly snippets are not available. So any other snippets also need to be added to the path (or copied locally) Alternatively I could contribute the snippets to friendly snippets and see if they are merged - this would be a much slower process than desired. I could fork friendly snippets in the mean time and add my custom snippets there... then use the fork as the plugin. |
Would it be possible to add documentation on how to use snippets with the configuration?
Specifically I would like to add personal snippets that support markdown content and mkdocs extensions.
I would also like to evaluate community snippets such as rafamadriz/friendly-snippets but it is unclear how these can be added. Simply adding friendly snippets as a plugin in plugin.fnl does not include these snippets.
I have tried adding a
snippets
directory in the.config/nvim/
directory and copied markdown snippets from vim-snippets which seem to appear in theTAB
completion list, although they do not expand.In
fnl/config/plugion/cmp.fnl
several sources for autocompletion are defined, although it is unclear what these source specifically refer to forbuffer
,vsnip
andluasnip
In Luasnip it discusses loaders, so curious to understand if these loaders are used or relevant to the fennel configuration
What are the supported approaches for snippets in the current configuration, or how could it be extended to support custom snippets?
Thank you
The text was updated successfully, but these errors were encountered: