2024-09-14 11:05:12 +02:00
|
|
|
{ config, lib, pkgs, inputs, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
inherit (lib) mkEnableOption mkIf readFile;
|
|
|
|
in
|
|
|
|
{
|
2024-10-07 09:31:06 +02:00
|
|
|
home-manager.users.moritz = {
|
|
|
|
xdg.configFile."nvim/snippets" = {
|
|
|
|
recursive = true;
|
|
|
|
source = ../snippets;
|
|
|
|
};
|
|
|
|
programs.nixvim = {
|
|
|
|
plugins.luasnip = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
history = true;
|
|
|
|
update_events = "TextChanged,TextChangedI";
|
|
|
|
delete_check_events = "TextChanged";
|
|
|
|
ext_opts.__raw = ''
|
|
|
|
{
|
|
|
|
[require("luasnip.util.types").choiceNode] = {
|
|
|
|
active = {
|
|
|
|
virt_text = { { "<--", "Error" } },
|
|
|
|
},
|
2024-09-14 11:05:12 +02:00
|
|
|
},
|
2024-10-07 09:31:06 +02:00
|
|
|
}
|
|
|
|
'';
|
|
|
|
ft_func.__raw = ''require("luasnip.extras.filetype_functions").from_pos_or_filetype'';
|
|
|
|
};
|
2024-09-14 11:05:12 +02:00
|
|
|
};
|
2024-10-07 09:31:06 +02:00
|
|
|
extraConfigLuaPost = ''
|
|
|
|
require("luasnip.loaders.from_lua").load({ paths = "~/.config/nvim/snippets" })
|
|
|
|
require("luasnip.loaders.from_snipmate").lazy_load({ paths = "~/.config/nvim/snippets" })
|
|
|
|
require("luasnip.loaders.from_vscode").lazy_load()
|
|
|
|
'';
|
2024-09-14 11:05:12 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|