Add snippets for __invoke() and __construct()

This commit is contained in:
Oliver Davies 2024-01-17 22:05:41 +00:00
parent 940d23cc76
commit 839dff942e

View file

@ -7,6 +7,24 @@ local i = ls.insert_node
local t = ls.text_node
local M = {
__construct = fmta(
[[
public function __construct(<>) {
<>
}
]],
{ i(1), i(0) }
),
__invoke = fmta(
[[
public function __invoke(<>) {
<>
}
]],
{ i(1), i(0) }
),
func = fmta("function <>(<>)<> {\n <>\n}<>", { i(1), i(2), i(3), i(4), i(0) }),
met = fmta(