Merge pull request #11 from NotAShelf/feature/mind-nvim

feat: add mind-nvim to note-taking plugins
This commit is contained in:
NotAShelf 2023-02-16 21:10:51 +00:00 committed by GitHub
commit 23af12349a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 56 additions and 1 deletions

View file

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

View file

@ -514,6 +514,22 @@
"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": {
"flake": false,
"locked": {
@ -1079,6 +1095,7 @@
"lspkind": "lspkind",
"lspsaga": "lspsaga",
"lualine": "lualine",
"mind-nvim": "mind-nvim",
"minimap-vim": "minimap-vim",
"nil": "nil",
"nixpkgs": "nixpkgs",

View file

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

View file

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

View file

@ -2,5 +2,6 @@ _: {
imports = [
./obsidian
./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 = {
"<leader>om" = ":MindOpenMain<CR>";
"<leader>op" = ":MindOpenProject<CR>";
"<leader>oc" = ":MindClose<CR>";
};
vim.luaConfigRC.mind-nvim = nvim.dag.entryAnywhere ''
require'mind'.setup()
'';
};
}