neovim-flake/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 16:30:26 +01: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 17:39:05 +01:00
pluginRC.obsidian = entryAnywhere ''
2024-02-17 16:30:26 +01:00
require("obsidian").setup(${toLuaObject cfg.setupOpts})
'';
};
};
}