From d587bbed9abfb6e106bef6fa791fe0c97766b02c 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 --- .../neovim/lua/opdavies/snippets/ft/nix.lua | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 config/neovim/lua/opdavies/snippets/ft/nix.lua diff --git a/config/neovim/lua/opdavies/snippets/ft/nix.lua b/config/neovim/lua/opdavies/snippets/ft/nix.lua new file mode 100644 index 0000000..0df27b6 --- /dev/null +++ b/config/neovim/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