feat(nvim): add python snippets

This commit is contained in:
Moritz Böhme 2024-02-11 21:14:21 +01:00
parent 96697c684c
commit a14f999ab9
Signed by: moritz
GPG key ID: 970C6E89EB0547A9

View file

@ -183,6 +183,51 @@ local dot_try = postfix(".try", {
end),
})
local parr = s(
"parr",
fmt(
[[
:param {name}: {description}
:type {name}: {type}
]],
{
name = i(1, "name"),
description = i(2, "description"),
type = i(3, "type"),
},
{
repeat_duplicates = true,
}
)
)
local retr = s(
"retr",
fmt(
[[
:return: {description}
:rtype: {rtype}
]],
{
description = i(1, "description"),
rtype = i(2, "rtype"),
}
)
)
local raisr = s(
"raisr",
fmt(
[[
:raises {exception}: {description}
]],
{
exception = i(1, "Exception"),
description = i(2, "description"),
}
)
)
return {
def,
defs,
@ -191,4 +236,7 @@ return {
dot_items,
dot_try,
enum,
parr,
retr,
raisr,
}