2022-10-18 15:32:49 +02:00
|
|
|
local ls = require "luasnip"
|
|
|
|
|
2022-11-06 19:05:37 +01:00
|
|
|
--local c = ls.choice_node
|
|
|
|
--local d = ls.dynamic_node
|
|
|
|
local i = ls.insert_node
|
|
|
|
--local r = ls.restore_node
|
|
|
|
local s = ls.snippet
|
|
|
|
--local sn = ls.snippet_node
|
|
|
|
local t = ls.text_node
|
|
|
|
local fmt = require("luasnip.extras.fmt").fmt
|
2022-11-11 18:47:09 +01:00
|
|
|
local rep = require("luasnip.extras").rep
|
2022-11-06 19:05:37 +01:00
|
|
|
|
2022-01-22 16:38:51 +01:00
|
|
|
require("luasnip.loaders.from_vscode").load()
|
|
|
|
require("luasnip.loaders.from_snipmate").load()
|
2022-10-18 15:32:49 +02:00
|
|
|
|
|
|
|
ls.add_snippets("markdown", {
|
2022-11-06 19:05:37 +01:00
|
|
|
s("shrug", {
|
|
|
|
t [[¯\_(ツ)_/¯]],
|
2022-10-18 15:32:49 +02:00
|
|
|
}),
|
|
|
|
})
|
2022-11-06 19:05:37 +01:00
|
|
|
|
|
|
|
ls.add_snippets("java", {
|
|
|
|
s(
|
|
|
|
"getDescriptionPacket",
|
|
|
|
fmt(
|
|
|
|
[[@Override
|
|
|
|
public Packet getDescriptionPacket() {{
|
|
|
|
NBTTagCompound nbt = new NBTTagCompound();
|
|
|
|
|
|
|
|
{content}
|
|
|
|
|
|
|
|
return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord,
|
|
|
|
this.getBlockMetadata(), nbt);
|
|
|
|
}}]] ,
|
|
|
|
|
|
|
|
{ content = i(1) }
|
|
|
|
)
|
|
|
|
),
|
2022-11-09 14:44:06 +01:00
|
|
|
s("markForUpdate", t [[this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);]]),
|
2022-11-06 19:05:37 +01:00
|
|
|
})
|
2022-11-11 18:47:09 +01:00
|
|
|
|
|
|
|
ls.add_snippets("json", {
|
|
|
|
s(
|
|
|
|
"sound",
|
|
|
|
fmt(
|
|
|
|
[["{name0}": {{
|
|
|
|
"category": "master",
|
|
|
|
"sounds": [
|
|
|
|
{{
|
|
|
|
"name": "{name1}",
|
|
|
|
"stream": false
|
|
|
|
}}
|
|
|
|
]
|
|
|
|
}},]] ,
|
|
|
|
{
|
|
|
|
name0 = i(1),
|
|
|
|
name1 = rep(1),
|
|
|
|
}
|
|
|
|
)
|
|
|
|
),
|
|
|
|
})
|