nvf/modules/plugins/notes/obsidian/config.nix

31 lines
587 B
Nix
Raw Permalink Normal View History

{
config,
lib,
...
}: let
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;
cfg = config.vim.notes.obsidian;
in {
config = mkIf cfg.enable {
vim = {
startPlugins = [
"obsidian-nvim"
"vim-markdown"
"tabular"
];
binds.whichKey.register = pushDownDefault {
"<leader>o" = "+Notes";
};
2024-02-25 16:39:05 +00:00
pluginRC.obsidian = entryAnywhere ''
2024-02-17 15:30:26 +00:00
require("obsidian").setup(${toLuaObject cfg.setupOpts})
'';
};
};
}