home.social

#luasnip — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #luasnip, aggregated by home.social.

  1. 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.

  2. 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

  3. 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

  4. 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

  5. So multi-language/filetype snippets using are working without issue in . But can I get nvim-cmp to display from two language servers in one ?!

    All signs are pointing to no for the time being... but maybe someone here knows the answer.

  6. 🖋️ On my and now on Mastodon: cj.rs/blog/generating-snippets

    A way to automatically generate a bunch of similar snippets with and

    💬 Feel free to comment here!

  7. Been spending the last couple of days in a slideshow writing trance, preparing for workshop in Fulda, Germany in the end of the month. Holy fuck, I’m so, so impressed with #latex #beamer! Paired with #nvim, #vimtex and #luasnip it’s a dream setup.

  8. 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: gitlab.com/kflak/dots/-/blob/m