mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-12-08 21:23:53 +00:00
codewindow: allow opening on setup
codewindow: allow opening on setup
This commit is contained in:
parent
09470524a2
commit
232e4a06f3
2 changed files with 21 additions and 4 deletions
|
|
@ -1,9 +1,12 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.nvim.binds) mkMappingOption;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
inherit (lib.types) bool str listOf;
|
||||
in {
|
||||
options.vim.minimap.codewindow = {
|
||||
enable = mkEnableOption "codewindow plugin for minimap view";
|
||||
openByDefault = mkEnableOption "codewindow plugin opening automatically";
|
||||
|
||||
mappings = {
|
||||
open = mkMappingOption "Open minimap [codewindow]" "<leader>mo";
|
||||
|
|
@ -11,5 +14,19 @@ in {
|
|||
toggle = mkMappingOption "Toggle minimap [codewindow]" "<leader>mm";
|
||||
toggleFocus = mkMappingOption "Toggle minimap focus [codewindow]" "<leader>mf";
|
||||
};
|
||||
|
||||
setupOpts = mkPluginSetupOption "codewindow" {
|
||||
auto_enable = mkOption {
|
||||
description = "Open automatically";
|
||||
type = bool;
|
||||
default = true;
|
||||
};
|
||||
|
||||
exclude_filetypes = mkOption {
|
||||
description = "Excluded files types";
|
||||
type = listOf str;
|
||||
default = ["NvimTree" "orgagenda" "Alpha"];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,9 +33,9 @@ in {
|
|||
|
||||
pluginRC.codewindow = entryAnywhere ''
|
||||
local codewindow = require('codewindow')
|
||||
codewindow.setup({
|
||||
exclude_filetypes = { 'NvimTree', 'orgagenda', 'Alpha'},
|
||||
})
|
||||
codewindow.setup(
|
||||
${lib.nvim.lua.toLuaObject cfg.setupOpts}
|
||||
)
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue