cajus-nvim icon indicating copy to clipboard operation
cajus-nvim copied to clipboard

How to use community snippets add and add personal snippets

Open practicalli-johnny opened this issue 1 year ago • 6 comments

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 the TAB 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 for buffer, vsnip and luasnip

(def- cmp-src-menu-items
  {:buffer "buff"
   :conjure "conj"
   :nvim_lsp "lsp"
   :vsnip "vsnp"
   :luasnip "lsnp"})

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

practicalli-johnny avatar Dec 11 '22 15:12 practicalli-johnny