1
0
Fork 0

nvim: add cpp-snippet for main()

This commit is contained in:
tastytea 2022-09-06 05:57:40 +02:00
parent 479a902aeb
commit 7be834ccfd
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
1 changed files with 10 additions and 1 deletions

View File

@ -3,6 +3,7 @@ local s = require("luasnip.nodes.snippet").S
local f = require("luasnip.nodes.functionNode").F
local i = require("luasnip.nodes.insertNode").I
local fmt = require("luasnip.extras.fmt").fmt
local t = require("luasnip.nodes.textNode").T
local agpl =
[[/* This file is part of {project}.
@ -88,5 +89,13 @@ return {
or 'INSERT_EMAIL'
end),
cursor = i(0)
}))
})),
s({ trig = 'main',
name = 'main',
dscr = 'main function'
}, {
t({ 'int main(int argc, char *argv[]) {' }),
i(0),
t({ '', '}' })
})
}