nvim: add gentoo review comment snippets

This commit is contained in:
tastytea 2022-09-06 03:10:33 +02:00
parent 6a43335840
commit d1e690de4a
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM

View File

@ -0,0 +1,22 @@
local s = require("luasnip.nodes.snippet").S
local t = require("luasnip.nodes.textNode").T
local fmt = require("luasnip.extras.fmt").fmt
local i = require("luasnip.nodes.insertNode").I
return {
-- some common Gentoo review comments
s({ trig = 'pkgdev',
name = 'use pkgdev',
}, {
t({ [[Consider comitting and pushing with ]] ..
[[[`pkgdev`](https://wiki.gentoo.org/wiki/Pkgdev) or checking ]] ..
[[with [`pkgcheck`](https://wiki.gentoo.org/wiki/Pkgcheck) ]] ..
[[before pushing, it catches these things.]]
}),
}),
s({ trig = 'quotevar',
name = 'quote variable',
},
fmt([[Please quote `${{{variable}}}`, it could contain spaces.]],
{ variable = i(1) }))
}