mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-05 04:51:14 +00:00
32 lines
540 B
Nix
32 lines
540 B
Nix
|
{
|
||
|
config,
|
||
|
lib,
|
||
|
...
|
||
|
}:
|
||
|
with lib;
|
||
|
with builtins; let
|
||
|
cfg = config.vim.notes.obsidian;
|
||
|
auto = config.vim.autocomplete;
|
||
|
in {
|
||
|
config = mkIf (cfg.enable) {
|
||
|
vim.startPlugins = [
|
||
|
"obsidian-nvim"
|
||
|
"vim-markdown"
|
||
|
"tabular"
|
||
|
];
|
||
|
|
||
|
vim.luaConfigRC.obsidian = nvim.dag.entryAnywhere ''
|
||
|
require("obsidian").setup({
|
||
|
dir = "${cfg.dir}",
|
||
|
completion = {
|
||
|
nvim_cmp = ${
|
||
|
if (auto.type == "nvim-cmp")
|
||
|
then "true"
|
||
|
else "false"
|
||
|
}
|
||
|
}
|
||
|
})
|
||
|
'';
|
||
|
};
|
||
|
}
|