feat: apply new module format to minimap plugins

This commit is contained in:
NotAShelf 2023-02-27 22:29:01 +03:00
commit 7149c92d1e
No known key found for this signature in database
GPG key ID: 5B5C8895F28445F1
7 changed files with 42 additions and 10 deletions

View file

@ -0,0 +1,14 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.minimap.codewindow;
in {
options.vim.minimap.codewindow = {
enable = mkEnableOption "Enable minimap-vim plugin";
};
}

View file

@ -0,0 +1,25 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.minimap.codewindow;
in {
config = mkIf cfg.enable {
vim.startPlugins = [
"codewindow-nvim"
];
vim.luaConfigRC.codewindow = nvim.dag.entryAnywhere ''
local codewindow = require('codewindow')
codewindow.setup({
exclude_filetypes = { 'NvimTree', 'orgagenda'},
}
)
codewindow.apply_default_keybinds()
'';
};
}

View file

@ -0,0 +1,6 @@
_: {
imports = [
./codewindow.nix
./config.nix
];
}