From c80a54e42b52ce297f0f2f71af23c562832025c7 Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Fri, 24 Jan 2025 20:35:27 +0900 Subject: init --- .../TheSiahxyz/lua/thesiahxyz/snippets/whichkey.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 ar/.config/TheSiahxyz/lua/thesiahxyz/snippets/whichkey.lua (limited to 'ar/.config/TheSiahxyz/lua/thesiahxyz/snippets/whichkey.lua') diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/snippets/whichkey.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/snippets/whichkey.lua new file mode 100644 index 0000000..fab5853 --- /dev/null +++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/snippets/whichkey.lua @@ -0,0 +1,18 @@ +local ls = require("luasnip") + +-- Using parse_snippet instead of fmt to avoid curly brace issues +local whichkey_snippet = ls.parser.parse_snippet( + "whichkey", + [[ +init = function() + local wk = require("which-key") + wk.add({ + mode = { "n" }, + { "${1:Key}", group = "${2:Name}" }, + }) +end, +]] +) + +-- Add the snippets for the Lua filetype +ls.add_snippets("lua", { whichkey_snippet }) -- cgit v1.2.3