neovim: add obsidian plugin

This commit is contained in:
Aaron Bieber 2023-01-18 15:48:33 -07:00
parent 30fa9c920c
commit c0a81d4241
No known key found for this signature in database
2 changed files with 29 additions and 3 deletions

View File

@ -50,7 +50,16 @@ require("nvim-tree").setup({
},
})
require 'mind'.setup()
require('mind').setup()
require("obsidian").setup({
dir = "~/Brain",
daily_notes = {
folder = "Daily",
},
completion = {
nvim_cmp = false,
}
})
cmd [[highlight NvimTreeOpenedFolderName guifg=default]]
cmd [[highlight NvimTreeFolderName guifg=default]]
@ -70,6 +79,7 @@ map('n', '<leader>s', ':%s/\\s\\+$//e', { noremap = true })
map('n', '<leader>fm', ':Telescope manix<CR>', {})
map('n', '<leader>mo', ':MindOpenMain<CR>', {})
map('n', '<leader>mp', ':MindOpenProject<CR>', {})
map('n', '<leader>ot', ':ObsidianToday<CR>', {})
map('n', '<leader>1', ':GitGutterToggle<CR>', { noremap = true })
map('n', '<leader>2', ':set list!<CR>', { noremap = true })
@ -77,7 +87,6 @@ map('n', '<leader>3', ':set nu!<CR>', { noremap = true })
map('n', '<leader>4', ':set paste!<CR>', { noremap = true })
vim.keymap.set('n', '<space>f', function() vim.lsp.buf.format { async = true } end, bufopts)
local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})

View File

@ -21,6 +21,21 @@ let
sha256 = "sha256-eea0Ntr3gCmF6iZ0adZaVswWH70K9IJZ4SAyVSdFp3E=";
};
};
obsidian = pkgs.vimUtils.buildVimPluginFrom2Nix rec {
pname = "obsidian-nvim";
version = "1.6.1";
src = pkgs.fetchFromGitHub {
owner = "epwalsh";
repo = "obsidian.nvim";
rev = "v${version}";
sha256 = "sha256-2VxDk5FHpVMxPR/or9ZsaaDOLlaraOHJoN7C8JI0+24=";
fetchSubmodules = true;
};
dependencies = with vimPlugins; [
nvim-cmp
tabular
];
};
mind = pkgs.vimUtils.buildVimPluginFrom2Nix rec {
pname = "mind.nvim";
version = "2.2.1";
@ -30,7 +45,7 @@ let
rev = "79e0ca131d5e37dfa65f3f0e725d99742e4ff783";
sha256 = "sha256-y64F9v7Ggzagmz2p2EYTdtKDuGyA19xYXqW92S0tRj0=";
};
nativeBuildBuildInputs = with vimPlugins; [
dependencies = with vimPlugins; [
plenary-nvim
];
};
@ -41,11 +56,13 @@ let
nvim-lspconfig
nvim-tree-lua
rust-vim
obsidian
telescope-fzf-native-nvim
telescope-nvim
vimagit
vim-gitgutter
vim-lua
vim-markdown
vim-nix
vim-ocaml
zig-vim