neovim-flake/modules/notes/mind-nvim/config.nix

30 lines
588 B
Nix
Raw Normal View History

{
config,
lib,
...
}: let
2024-02-25 17:39:05 +01:00
inherit (lib) mkIf nvim defaultAttributes;
cfg = config.vim.notes.mind-nvim;
in {
config = mkIf (cfg.enable) {
vim.startPlugins = [
"mind-nvim"
];
vim.maps.normal = {
"<leader>om" = {action = ":MindOpenMain<CR>";};
"<leader>op" = {action = ":MindOpenProject<CR>";};
"<leader>oc" = {action = ":MindClose<CR>";};
};
2024-02-25 17:39:05 +01:00
vim.binds.whichKey.register = defaultAttributes {
"<leader>o" = "+Notes";
};
vim.luaConfigRC.mind-nvim = nvim.dag.entryAnywhere ''
require'mind'.setup()
'';
};
}