nixvim-config/plugins/luasnip.nix

42 lines
843 B
Nix
Raw Normal View History

{ ... }:
{
programs.nixvim = {
keymaps = [
{
mode = "i";
key = "<c-b>";
action.__raw = ''function() require("luasnip.extras.select_choice")() end'';
options.desc = "Search";
}
];
plugins.luasnip = {
enable = true;
fromLua = [
{}
{
paths = ./snippets;
}
];
settings = {
history = true;
updateevents = ["TextChanged" "TextChangedI"];
region_check_events = "CursorHold";
delete_check_events = "InsertLeave";
ext_opts.__raw = ''
{
[require('luasnip.util.types').choiceNode] = {
active = {
virt_text = { { 'choice <c-b>', 'Comment' } },
hl_mode = 'combine',
},
},
}
'';
};
};
};
}