Luasnip
It’s snippets time!
I write code for a living. But, do I really? I mean, sure, I write code, but that’s not what I spend most of my time doing. No, the real workflow looks more like this:
- I read and understand a ticket/issue,
- I dive into an existing codebase, explore some documentation,
- When I figure out what to do and where to do it, I write the code,
- Once done with this, I add some tests, commit, push, create a pull request and call it a day.
The experienced programmer knows: only the third point implies writing some actual code. The rest of the list is meetings, readings, and boilerplate. The boilerplate, the code that needs to be written but does not have inherent value. We can actually automate most of the effort using pre-built snippets of code.
Let’s see how to do this in
neovim
with theluasnip
plugin. I’ll cover the plugins installation and configuration process and then build some real-life snippets to showcase some advanced features we can rely on.
1 / 1