Add python snippet for creating sqlalchemy table
This commit is contained in:
parent
29884f0e0c
commit
88b0c1ffc2
1 changed files with 18 additions and 0 deletions
|
@ -14,6 +14,24 @@ local fmta = require("luasnip.extras.fmt").fmta
|
||||||
local rep = require("luasnip.extras").rep
|
local rep = require("luasnip.extras").rep
|
||||||
|
|
||||||
ls.add_snippets("python", {
|
ls.add_snippets("python", {
|
||||||
|
s(
|
||||||
|
{ trig = "ctable", dscr = "Create method or function with test stub" },
|
||||||
|
fmt(
|
||||||
|
[[
|
||||||
|
{} = Table(
|
||||||
|
"{}",
|
||||||
|
metadata_obj,
|
||||||
|
Column("id", Integer, primary_key=True),
|
||||||
|
{}
|
||||||
|
)
|
||||||
|
]],
|
||||||
|
{
|
||||||
|
i(1),
|
||||||
|
rep(1),
|
||||||
|
i(0)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
),
|
||||||
s({ trig = "cmethod", dscr = "Create method or function with test stub" },
|
s({ trig = "cmethod", dscr = "Create method or function with test stub" },
|
||||||
fmta(
|
fmta(
|
||||||
[[
|
[[
|
||||||
|
|
Loading…
Reference in a new issue