1
Fork 0

Configure obsidian.nvim keybinds & more

- configure obsidian nvim keybinds
- fix typo: `img` => `imv`
- re-enable docker on tethys (also adds a hacky mysql db for... reasons)
This commit is contained in:
prescientmoon 2024-03-07 02:49:09 +01:00
parent e71a356d65
commit e4b7645102
Signed by: prescientmoon
SSH key fingerprint: SHA256:UUF9JT2s8Xfyv76b8ZuVL7XrmimH4o49p4b+iexbVH4
4 changed files with 23 additions and 55 deletions
home/features/neovim

View file

@ -1311,14 +1311,26 @@ let
package = "epwalsh/obsidian.nvim";
dependencies.lua = [ "plenary" ];
event = "VeryLazy";
cond = [
(blacklist [ "vscode" "firenvim" ])
(lua /* lua */ "vim.loop.cwd() == ${encode vault}")
];
event = "VeryLazy";
keys.mapping = "<C-O>";
keys.action = "<cmd>ObsidianQuickSwitch<cr>";
config.keys =
let nmap = mapping: action: desc: {
inherit mapping desc;
action = "<cmd>Obsidian${action}<cr>";
};
in
[
(nmap "<C-O>" "QuickSwitch<cr>" "[o]pen note")
(nmap "<leader>ot" "Today" "[t]oday's note")
(nmap "<leader>oy" "Yesterday" "[y]esterday's note")
(nmap "<leader>oi" "Template" "[i]nstantiate template")
(nmap "<leader>on" "Template New note.md" "new [n]ote template")
(nmap "<leader>od" "Template New note.md" "new [d]ream template")
];
opts = {
dir = vault;