feat: add lazy loading to nvim
This commit is contained in:
parent
6ebfb3d109
commit
752dfc55e8
64 changed files with 68 additions and 1265 deletions
|
|
@ -1,38 +0,0 @@
|
|||
{ config, lib, pkgs, inputs, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf readFile;
|
||||
in
|
||||
{
|
||||
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" } },
|
||||
},
|
||||
},
|
||||
}
|
||||
'';
|
||||
ft_func.__raw = ''require("luasnip.extras.filetype_functions").from_pos_or_filetype'';
|
||||
};
|
||||
};
|
||||
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()
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue