#luasnip — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #luasnip, aggregated by home.social.
-
After spending 7 hours to publish the code while going through a 71 page PDF.
The 71 pages were reduced to 43 pages in the `clean-html.js` step. And in the next step of `create-question.js` it was expanded to 63 pages.
Most of the time I was in the cleaning phase, since this is where one can remove pages and add questions quickly without the need of either copy-pasting the wording directly to #anki or manually typing it out.
One thing that has been holding me back is not having a #LuaSnip in #NeoVim to generate snippets quickly.
-
Okay, I‘m one step closer. I had made a bunch of mistakes. Here are my takeaways:
- you need to supply a directory containing either subdirectories or lua files named after the language.
- you need to return a list with two items, were the first item is normal snippets and the second item is auto snippets
- when calling s(), it‘s crucial that you pass {trig = „something“, desc „something else“} as the first parameter and the node table as the second. #luasnip -
With the fixes above I can now expand my custom snippets 😻 I still have some problems though: right now I can only fill in the first placeholder. And repeat nodes don‘t seem to work. Or do I need to jump in order to fill them with the reference node‘s content? I think I need to add additional keybindings in order to jump to the next placeholder. #luasnip
-
Does anybody have a working NixVim setup that includes: cmp, cmp_luasnip, friendly-snippets, and then luasnip for loading friendly-snippets and custom lua snippets on top? I thought this would be as easy as passing my custom snippets folder to fromLua, but my custom snippets are not added to the snippet list 😕 #NixOS #NixVim #NeoVim #lua #luasnip
-
🖋️ On my #blog and now on Mastodon: https://cj.rs/blog/generating-snippets-with-luasnip/
A way to automatically generate a bunch of similar snippets with #LuaSnip and #neovim
💬 Feel free to comment here!
-
Been banging my head against a #luasnip shaped wall all day... grrr... has anybody managed to make #nvim and #lsp work together to produce actual snippets? Preferably using #packer configuration... My plugin config is here, if anybody feel like taking a look and see where i have f**ked up: https://gitlab.com/kflak/dots/-/blob/main/nvim/lua/plugins.lua