mirror of
https://github.com/kmein/niveum
synced 2026-03-16 10:11:08 +01:00
feat: make obsidian-vim and neovim bearable
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
coreutils,
|
||||
noteDirectory ? "~/cloud/syncthing/obsidian",
|
||||
currentDates ? false,
|
||||
niveumPackages,
|
||||
}:
|
||||
writers.writeDashBin "notemenu" ''
|
||||
set -efu
|
||||
@@ -23,6 +24,6 @@ writers.writeDashBin "notemenu" ''
|
||||
} | rofi -dmenu -i -p 'notes')
|
||||
if test "$note_file"
|
||||
then
|
||||
alacritty --working-directory ${noteDirectory} -e "$EDITOR" "$note_file"
|
||||
alacritty --working-directory ${noteDirectory} -e ${niveumPackages.obsidian-vim}/bin/nvim "$note_file"
|
||||
fi
|
||||
''
|
||||
|
||||
@@ -1,17 +1,29 @@
|
||||
{
|
||||
neovim,
|
||||
vimPlugins,
|
||||
vault ? "~/cloud/syncthing/obsidian/",
|
||||
obsidiantVaultDirectory ? "~/cloud/syncthing/obsidian/",
|
||||
...
|
||||
}:
|
||||
neovim.override {
|
||||
configure = {
|
||||
customRC = ''
|
||||
let g:vimwiki_list = [{'path': '${vault}',
|
||||
source ${../lib/vim/shared.vim}
|
||||
|
||||
cd ${obsidiantVaultDirectory}
|
||||
|
||||
let g:vimwiki_list = [{'path': '${obsidiantVaultDirectory}',
|
||||
\ 'syntax': 'markdown', 'ext': '.md'}]
|
||||
|
||||
let NERDTreeSortOrder = ['[[-timestamp]]']
|
||||
|
||||
" Start NERDTree and put the cursor back in the other window.
|
||||
autocmd VimEnter * NERDTree ${obsidiantVaultDirectory} | wincmd p
|
||||
'';
|
||||
packages.nvim.start = [
|
||||
vimPlugins.vimwiki
|
||||
vimPlugins.nerdtree
|
||||
vimPlugins.fzf-vim
|
||||
vimPlugins.fzfWrapper
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
}: (neovim.override {
|
||||
configure = {
|
||||
customRC = ''
|
||||
luafile ${../lib/vim/init.lua}
|
||||
|
||||
source ${../lib/vim/shared.vim}
|
||||
source ${../lib/vim/init.vim}
|
||||
luafile ${../lib/vim/init.lua}
|
||||
'';
|
||||
packages.nvim = with vimPlugins; {
|
||||
start = [
|
||||
|
||||
Reference in New Issue
Block a user