mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 18:31:35 +00:00
modules/notes: switch to explicit lib calls
This commit is contained in:
parent
f6db808bfc
commit
2101ac9061
13 changed files with 154 additions and 144 deletions
|
@ -3,27 +3,31 @@
|
|||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf nvim pushDownDefault;
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.binds) pushDownDefault;
|
||||
|
||||
cfg = config.vim.notes.mind-nvim;
|
||||
in {
|
||||
config = mkIf (cfg.enable) {
|
||||
vim.startPlugins = [
|
||||
"mind-nvim"
|
||||
];
|
||||
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>";};
|
||||
maps.normal = {
|
||||
"<leader>om" = {action = ":MindOpenMain<CR>";};
|
||||
"<leader>op" = {action = ":MindOpenProject<CR>";};
|
||||
"<leader>oc" = {action = ":MindClose<CR>";};
|
||||
};
|
||||
|
||||
binds.whichKey.register = pushDownDefault {
|
||||
"<leader>o" = "+Notes";
|
||||
};
|
||||
|
||||
luaConfigRC.mind-nvim = entryAnywhere ''
|
||||
require'mind'.setup()
|
||||
'';
|
||||
};
|
||||
|
||||
vim.binds.whichKey.register = pushDownDefault {
|
||||
"<leader>o" = "+Notes";
|
||||
};
|
||||
|
||||
vim.luaConfigRC.mind-nvim = nvim.dag.entryAnywhere ''
|
||||
require'mind'.setup()
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
_: {
|
||||
{
|
||||
imports = [
|
||||
./mind-nvim.nix
|
||||
./config.nix
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption;
|
||||
{lib, ...}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in {
|
||||
options.vim.notes.mind-nvim = {
|
||||
enable = mkEnableOption "organizer tool for Neovim.";
|
||||
enable = mkEnableOption "note organizer tool for Neovim [mind-nvim]";
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue