From 50476e329532299b939c65327ae240f29c09bb06 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Thu, 12 Oct 2023 09:44:00 +0100 Subject: [PATCH] feat(nvim): add snippet for adding vim plugins --- lua/opdavies/snippets/ft/nix.lua | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 lua/opdavies/snippets/ft/nix.lua diff --git a/lua/opdavies/snippets/ft/nix.lua b/lua/opdavies/snippets/ft/nix.lua new file mode 100644 index 0000000..0df27b6 --- /dev/null +++ b/lua/opdavies/snippets/ft/nix.lua @@ -0,0 +1,23 @@ +local fmta = require("luasnip.extras.fmt").fmta +local ls = require "luasnip" + +local c = ls.choice_node +local i = ls.insert_node +local t = ls.text_node + +local M = { + vimplugin = fmta( + [[ + { + plugin = <>.<>; + type = "lua"; + config = '' + <> + ''; + }<> + ]], + { c(1, { t "vimPlugin", t "customVim" }), i(2), i(3), i(0) } + ), +} + +return M