Lua
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.NVim and Pandoc settings
For quite some time now, I only used markdown for either note-taking or making
revealjs
(Fr) presentations. And this blog of course…Anyway, while looking for my next employer, I recently had to produce a document and I wanted to use my usual tools:
nvim
to writemarkdown
and compile it usingpandoc
. The thing is, mynvim
configuration was kind of hard-coded forrevealjs
.It was time for me to address this issue and have it work for every type of
pandoc
use case.