Add Formatter Plugin

This commit is contained in:
2023-08-06 08:49:51 +02:00
parent 7e6edf6e73
commit 6d739e9ce5
5 changed files with 128 additions and 52 deletions

View File

@@ -8,3 +8,21 @@ Created on: `date`
$0
endsnippet
snippet def "Python Function" A
def ${1:function}($2):
"""
${3:function description}
Args:
${2} (${4:type}): ${5:description}
Returns:
$6 ${7:description}
"""
`!p
if t[6] != "" and not t[8].endswith(f"return {t[6]}"):
t[8] = t[8] + f"\n\treturn {t[6]}"`
$8
$0
endsnippet