Add: first import
This commit is contained in:
commit
82641f61be
23 changed files with 800 additions and 0 deletions
25
lua/snippets/cpp.lua
Normal file
25
lua/snippets/cpp.lua
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
local ls = require("luasnip") -- Import LuaSnip
|
||||
local s = ls.snippet
|
||||
local t = ls.text_node
|
||||
local i = ls.insert_node
|
||||
|
||||
return {
|
||||
s("main", {
|
||||
t({ "#include <iostream>", "", "int main() {", " " }),
|
||||
i(1, "// Code ici"),
|
||||
t({ "", " return 0;", "}" }),
|
||||
}),
|
||||
s("for", {
|
||||
t("for (int "),
|
||||
i(1, "i"),
|
||||
t(" = 0; "),
|
||||
i(2, "i"),
|
||||
t(" < "),
|
||||
i(3, "n"),
|
||||
t("; ++"),
|
||||
i(4, "i"),
|
||||
t({ ") {", " " }),
|
||||
i(5, "// Corps de la boucle"),
|
||||
t({ "", "}" }),
|
||||
}),
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue