2023-02-27 19:26:16 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
2023-11-07 00:50:27 +00:00
|
|
|
}: let
|
2024-03-12 00:47:01 +00:00
|
|
|
inherit (lib.modules) mkIf;
|
|
|
|
inherit (lib.nvim.dag) entryAnywhere;
|
|
|
|
inherit (lib.nvim.binds) pushDownDefault;
|
2024-02-17 15:30:26 +00:00
|
|
|
inherit (lib.nvim.lua) toLuaObject;
|
2023-11-07 00:50:27 +00:00
|
|
|
|
2023-02-27 19:26:16 +00:00
|
|
|
cfg = config.vim.notes.obsidian;
|
|
|
|
in {
|
2024-03-12 00:47:01 +00:00
|
|
|
config = mkIf cfg.enable {
|
|
|
|
vim = {
|
|
|
|
startPlugins = [
|
|
|
|
"obsidian-nvim"
|
|
|
|
"vim-markdown"
|
|
|
|
"tabular"
|
|
|
|
];
|
2023-02-27 19:26:16 +00:00
|
|
|
|
2024-03-12 00:47:01 +00:00
|
|
|
binds.whichKey.register = pushDownDefault {
|
|
|
|
"<leader>o" = "+Notes";
|
|
|
|
};
|
2024-02-25 16:39:05 +00:00
|
|
|
|
2024-07-20 08:30:48 +00:00
|
|
|
pluginRC.obsidian = entryAnywhere ''
|
2024-02-17 15:30:26 +00:00
|
|
|
require("obsidian").setup(${toLuaObject cfg.setupOpts})
|
2024-03-12 00:47:01 +00:00
|
|
|
'';
|
|
|
|
};
|
2023-02-27 19:26:16 +00:00
|
|
|
};
|
|
|
|
}
|