feat: neovim plugins update

This commit is contained in:
gwg313 2024-09-26 11:35:37 -04:00
parent 6e8014e0b5
commit eaf110c96f
Signed by: gwg313
GPG key ID: 60FF63B4826B7400
13 changed files with 1195 additions and 6 deletions

View file

@ -0,0 +1,41 @@
{pkgs, ...}: {
programs.nixvim = {
plugins.luasnip = {
enable = true;
settings = {
enable_autosnippets = true;
store_selection_keys = "<Tab>";
};
fromVscode = [
{
lazyLoad = true;
paths = "${pkgs.vimPlugins.friendly-snippets}";
}
];
fromLua = [{paths = [../snippets];}];
};
extraFiles = {
"personal/luasnip-helper-funcs.lua".text = ''
local M = {}
local ls = require("luasnip")
local sn = ls.snippet_node
local i = ls.insert_node
function M.get_ISO_8601_date()
return os.date("%Y-%m-%d")
end
function M.get_visual(args, parent)
if (#parent.snippet.env.LS_SELECT_RAW > 0) then
return sn(nil, i(1, parent.snippet.env.LS_SELECT_RAW))
else
return sn(nil, i(1, '''))
end
end
return M
'';
};
};
}