Add luasnip instead of vsnip

This commit is contained in:
Martin
2025-07-20 18:29:36 +02:00
parent 1824ed760d
commit 206ca73ee5
3 changed files with 61 additions and 7 deletions

View File

@ -131,3 +131,23 @@ require("conform").setup({
-- lspconfig.zls.setup({ capabilities = capabilities })
-- end,
-- })
--
local get_datetime = function()
return os.date("%Y-%m-%d %H:%M")
end
local ls = require('luasnip')
ls.add_snippets("markdown", {
ls.snippet("mindful", {
-- Inserts the output of the get_datetime function as static text
ls.function_node(get_datetime, {}),
ls.text_node(" -- "),
ls.insert_node(1, "project"),
ls.text_node(" -- "),
ls.insert_node(2, "mode"),
ls.text_node(" -- "),
ls.insert_node(3, "description"),
}, {
descr = "Mindful of distractions",
}),
})