feat: add more obsidian keybinds
This commit is contained in:
parent
d3ce1b22c4
commit
d774279c50
1 changed files with 11 additions and 4 deletions
|
@ -1,8 +1,5 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
_:
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf readFile;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
home-manager.users.moritz.programs.nixvim = {
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
plugins.obsidian = {
|
plugins.obsidian = {
|
||||||
|
@ -23,6 +20,16 @@ in
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
|
mappings = {
|
||||||
|
"<localleader>n" = { action.__raw = ''function() return vim.cmd("ObsidianNew") end''; opts.desc = "New Note"; opts.buffer = true; };
|
||||||
|
"<localleader>q" = { action.__raw = ''function() return vim.cmd("ObsidianQuickSwitch") end''; opts.desc = "Quick Switch"; opts.buffer = true; };
|
||||||
|
"<localleader>b" = { action.__raw = ''function() return vim.cmd("ObsidianBacklinks") end''; opts.desc = "Backlinks"; opts.buffer = true; };
|
||||||
|
"<localleader>l" = { action.__raw = ''function() return vim.cmd("ObsidianLink") end''; opts.desc = "Link"; opts.buffer = true; };
|
||||||
|
"<localleader>e" = { action.__raw = ''function() return vim.cmd("ObsidianExtractNote") end''; opts.desc = "Extract Note"; opts.buffer = true; };
|
||||||
|
"<localleader>r" = { action.__raw = ''function() return vim.cmd("ObsidianRename") end''; opts.desc = "Rename"; opts.buffer = true; };
|
||||||
|
"<cr>" = { action.__raw = ''function() return require("obsidian").util.smart_action() end''; opts.buffer = true; opts.expr = true; };
|
||||||
|
"gf" = { action.__raw = ''function() return require("obsidian").util.gf_passthrough() end''; opts = { noremap = false; expr = true; buffer = true; }; };
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue