update nvim config

This commit is contained in:
LordMZTE 2022-11-11 18:47:09 +01:00
parent 9ca0b19b6d
commit b237481e89
Signed by: LordMZTE
GPG key ID: B64802DC33A64FF6
2 changed files with 27 additions and 0 deletions

View file

@ -31,3 +31,8 @@ map("n", "gr", "<cmd>lua vim.lsp.buf.references()<CR>", opts)
map("n", "<space>e", "<cmd>lua vim.diagnostic.open_float()<CR>", opts)
map("n", "-d", "<cmd>lua vim.diagnostic.goto_next()<CR>", opts)
map("n", "-r", "<cmd>lua vim.lsp.buf.format { asnyc = true }<CR>", opts)
-- command to stop LSP servers
vim.api.nvim_create_user_command("StopLsps", function()
vim.lsp.stop_client(vim.lsp.get_active_clients())
end, { nargs = 0 })

View file

@ -8,6 +8,7 @@ local s = ls.snippet
--local sn = ls.snippet_node
local t = ls.text_node
local fmt = require("luasnip.extras.fmt").fmt
local rep = require("luasnip.extras").rep
require("luasnip.loaders.from_vscode").load()
require("luasnip.loaders.from_snipmate").load()
@ -37,3 +38,24 @@ public Packet getDescriptionPacket() {{
),
s("markForUpdate", t [[this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);]]),
})
ls.add_snippets("json", {
s(
"sound",
fmt(
[["{name0}": {{
"category": "master",
"sounds": [
{{
"name": "{name1}",
"stream": false
}}
]
}},]] ,
{
name0 = i(1),
name1 = rep(1),
}
)
),
})