From 5c221b7c3e088bfe39c40db75c0c811f2a138151 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Thu, 13 Feb 2025 13:02:34 -0300 Subject: [PATCH] feat(neovim): extend razor luasnip with html snippets --- .../programs/neovim/lua/plugins/luasnip.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 modules/home-manager/programs/neovim/lua/plugins/luasnip.lua diff --git a/modules/home-manager/programs/neovim/lua/plugins/luasnip.lua b/modules/home-manager/programs/neovim/lua/plugins/luasnip.lua new file mode 100644 index 0000000..7827042 --- /dev/null +++ b/modules/home-manager/programs/neovim/lua/plugins/luasnip.lua @@ -0,0 +1,15 @@ +return { + "L3MON4D3/LuaSnip", + config = function(plugin, opts) + -- include the default astronvim config that calls the setup call + require "astronvim.plugins.configs.luasnip" (plugin, opts) + + -- load snippets paths + require("luasnip.loaders.from_lua").lazy_load { + paths = { vim.fn.stdpath "config" .. "/snippets" }, + } + + -- extend 'razor' files with html snippets + require("luasnip").filetype_extend("razor", { "html" }) + end, +}