mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-24 06:10:44 +00:00
a7e0542fd0
* neorg: init * neorg: setupOpts work * neorg: disable by default * neorg: added changelog entry * neorg: setupOpts setup correctly * neorg: sane default for setupOpts * neorg: changed description and removed reduntant treesitter activation * neorg: added vim.treesitter.enable * neorg: fixing capitalisation * neorg: adding descriptions * neorg: formatting * neorg: added newline at the end of docs
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];
|
|
})
|
|
]);
|
|
}
|