update snippets
This commit is contained in:
@ -93,7 +93,7 @@ return {
|
||||
-- if the function isn't abstract include a body
|
||||
return sn(nil, {
|
||||
t({ " {", "\t" }),
|
||||
i(0),
|
||||
i(1),
|
||||
t({ "", "}" })
|
||||
})
|
||||
end
|
||||
@ -107,13 +107,20 @@ return {
|
||||
}),
|
||||
|
||||
-- class snippet
|
||||
s("class", {
|
||||
s({ trig = [[class\|interface]], trigEngine = "vim" }, {
|
||||
access_modifiers(1),
|
||||
modifiers(2),
|
||||
c(3, {
|
||||
t("class "),
|
||||
t("interface ")
|
||||
}),
|
||||
d(3, function(_, snip)
|
||||
local opts = { t("class "), t("interface ") }
|
||||
if snip.trigger == "interface" then
|
||||
-- flip interface and class
|
||||
opts[1], opts[2] = opts[2], opts[1]
|
||||
end
|
||||
|
||||
return sn(nil, {
|
||||
c(1, opts)
|
||||
})
|
||||
end, {}),
|
||||
c(4, {
|
||||
f(file_name, {}),
|
||||
i(0, "MyClass")
|
||||
|
Reference in New Issue
Block a user