mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-23 13:50:44 +00:00
42 lines
868 B
Nix
42 lines
868 B
Nix
|
{
|
||
|
config,
|
||
|
lib,
|
||
|
...
|
||
|
}: let
|
||
|
inherit (lib.modules) mkIf mkMerge;
|
||
|
inherit (lib.nvim.dag) entryAnywhere;
|
||
|
inherit (lib.nvim.binds) pushDownDefault;
|
||
|
inherit (lib.nvim.lua) toLuaObject;
|
||
|
|
||
|
cfg = config.vim.notes.neorg;
|
||
|
in {
|
||
|
config = mkIf cfg.enable (mkMerge [
|
||
|
{
|
||
|
vim = {
|
||
|
startPlugins = [
|
||
|
"lua-utils-nvim"
|
||
|
"nui-nvim"
|
||
|
"nvim-nio"
|
||
|
"pathlib-nvim"
|
||
|
"plenary-nvim"
|
||
|
"neorg"
|
||
|
"neorg-telescope"
|
||
|
];
|
||
|
|
||
|
binds.whichKey.register = pushDownDefault {
|
||
|
"<leader>o" = "+Notes";
|
||
|
};
|
||
|
|
||
|
pluginRC.neorg = entryAnywhere ''
|
||
|
require('neorg').setup(${toLuaObject cfg.setupOpts})
|
||
|
'';
|
||
|
};
|
||
|
}
|
||
|
|
||
|
(mkIf cfg.treesitter.enable {
|
||
|
vim.treesitter.enable = true;
|
||
|
vim.treesitter.grammars = [cfg.treesitter.norgPackage];
|
||
|
})
|
||
|
]);
|
||
|
}
|