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/quarto.lua | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 ar/.config/TheSiahxyz/lua/thesiahxyz/snippets/quarto.lua (limited to 'ar/.config/TheSiahxyz/lua/thesiahxyz/snippets/quarto.lua') diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/snippets/quarto.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/snippets/quarto.lua new file mode 100644 index 0000000..74b9fb8 --- /dev/null +++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/snippets/quarto.lua @@ -0,0 +1,28 @@ +local ls = require("luasnip") + +local s = ls.snippet +local i = ls.insert_node +local t = ls.text_node +-- local d = ls.dynamic_node +local c = ls.choice_node +-- local f = ls.function_node +-- local r = ls.restore_node +local fmt = require("luasnip.extras.fmt").fmta +-- local h = require("thesiahxyz.utils.snippet") + +local code_cell_snippet = s( + "`", + fmt( + [[``` + +``]], + { + lang = c(1, { t("python"), t("") }), + last = i(0), -- Place cursor here after expanding the snippet + } + ) +) + +-- Add the snippets for multiple filetypes +ls.add_snippets("markdown", { code_cell_snippet }) +ls.add_snippets("quarto", { code_cell_snippet }) -- cgit v1.2.3