Add python snippet for creating sqlalchemy table

This commit is contained in:
pro100ton 2025-02-02 15:58:28 +03:00
parent 29884f0e0c
commit 88b0c1ffc2

View file

@ -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(
[[ [[