mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 10:21:31 +00:00
feat: apply new module format to minimap plugins
This commit is contained in:
parent
f081bb916f
commit
7149c92d1e
7 changed files with 42 additions and 10 deletions
14
modules/minimap/codewindow/codewindow.nix
Normal file
14
modules/minimap/codewindow/codewindow.nix
Normal 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";
|
||||
};
|
||||
}
|
25
modules/minimap/codewindow/config.nix
Normal file
25
modules/minimap/codewindow/config.nix
Normal 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()
|
||||
'';
|
||||
};
|
||||
}
|
6
modules/minimap/codewindow/default.nix
Normal file
6
modules/minimap/codewindow/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./codewindow.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue