feat(nvim): add python snippets

nixos
Moritz Böhme 2024-02-11 21:14:21 +01:00
parent 96697c684c
commit a14f999ab9
Signed by: moritz
GPG Key ID: 970C6E89EB0547A9
1 changed files with 48 additions and 0 deletions

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,
}