feat: add mind-nvim to note-taking plugins

This commit is contained in:
NotAShelf 2023-02-16 23:57:56 +03:00
parent a3b533b923
commit 3d91f6c4c1
No known key found for this signature in database
GPG key ID: 5B5C8895F28445F1
6 changed files with 56 additions and 1 deletions

View file

@ -136,7 +136,8 @@ inputs: let
vim.notes = { vim.notes = {
obsidian.enable = false; # FIXME neovim fails to build if obsidian is enabled obsidian.enable = false; # FIXME neovim fails to build if obsidian is enabled
orgmode.enable = true; orgmode.enable = false;
mind-nvim.enable = true;
}; };
vim.terminal = { vim.terminal = {

View file

@ -514,6 +514,22 @@
"type": "github" "type": "github"
} }
}, },
"mind-nvim": {
"flake": false,
"locked": {
"lastModified": 1674572816,
"narHash": "sha256-yLf/2NvPT0RtFh6+0W32Uaj3Tjs52oyZSb8Jq3INZI4=",
"owner": "phaazon",
"repo": "mind.nvim",
"rev": "e59c52758c399caceb549c698cfa2d65e6bbb9f9",
"type": "github"
},
"original": {
"owner": "phaazon",
"repo": "mind.nvim",
"type": "github"
}
},
"minimap-vim": { "minimap-vim": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -1079,6 +1095,7 @@
"lspkind": "lspkind", "lspkind": "lspkind",
"lspsaga": "lspsaga", "lspsaga": "lspsaga",
"lualine": "lualine", "lualine": "lualine",
"mind-nvim": "mind-nvim",
"minimap-vim": "minimap-vim", "minimap-vim": "minimap-vim",
"nil": "nil", "nil": "nil",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",

View file

@ -361,6 +361,11 @@
flake = false; flake = false;
}; };
mind-nvim = {
url = "github:phaazon/mind.nvim";
flake = false;
};
# Terminal # Terminal
toggleterm-nvim = { toggleterm-nvim = {
url = "github:akinsho/toggleterm.nvim"; url = "github:akinsho/toggleterm.nvim";

View file

@ -68,6 +68,7 @@ with lib; let
"gesture-nvim" "gesture-nvim"
"comment-nvim" "comment-nvim"
"kommentary" "kommentary"
"mind-nvim"
]; ];
# You can either use the name of the plugin or a package. # You can either use the name of the plugin or a package.
pluginsType = with types; listOf (nullOr (either (enum availablePlugins) package)); pluginsType = with types; listOf (nullOr (either (enum availablePlugins) package));

View file

@ -2,5 +2,6 @@ _: {
imports = [ imports = [
./obsidian ./obsidian
./orgmode ./orgmode
./mind-nvim
]; ];
} }

View file

@ -0,0 +1,30 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.notes.mind-nvim;
in {
options.vim.notes.mind-nvim = {
enable = mkEnableOption "The power of trees at your fingertips. ";
};
config = mkIf (cfg.enable) {
vim.startPlugins = [
"mind-nvim"
];
vim.nnoremap = {
"<C-o-m>" = ":MindOpenMain<CR>";
"<C-o-p" = ":MindOpenProject<CR>";
"<leader>mc" = ":MindClose<CR>";
};
vim.luaConfigRC.mind-nvim = nvim.dag.entryAnywhere ''
require'mind'.setup()
'';
};
}