plugins/new-file-template: init module

This commit is contained in:
jacekpoz 2024-08-02 13:34:16 +02:00
commit 6f4df2e8aa
No known key found for this signature in database
5 changed files with 85 additions and 1 deletions

View file

@ -0,0 +1,23 @@
{
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})
'';
};
};
}