mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-12-24 20:29:49 +01:00
24 lines
448 B
Nix
24 lines
448 B
Nix
|
{
|
||
|
config,
|
||
|
lib,
|
||
|
...
|
||
|
}: let
|
||
|
inherit (lib.modules) mkIf;
|
||
|
inherit (lib.nvim.dag) entryAnywhere;
|
||
|
inherit (lib.nvim.lua) toLuaObject;
|
||
|
|
||
|
cfg = config.vim.utility.new-file-template;
|
||
|
in {
|
||
|
config = mkIf cfg.enable {
|
||
|
vim = {
|
||
|
startPlugins = [
|
||
|
"new-file-template-nvim"
|
||
|
];
|
||
|
|
||
|
pluginRC.new-file-template = entryAnywhere ''
|
||
|
require('new-file-template').setup(${toLuaObject cfg.setupOpts})
|
||
|
'';
|
||
|
};
|
||
|
};
|
||
|
}
|