nvim: add cpp-snippet for main()
This commit is contained in:
parent
479a902aeb
commit
7be834ccfd
|
@ -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({ '', '}' })
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user