mirror of
				https://github.com/NotAShelf/nvf.git
				synced 2025-10-31 11:02:37 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			41 lines
		
	
	
	
		
			899 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			41 lines
		
	
	
	
		
			899 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 cfg.treesitter.norgMetaPackage];
 | |
|     })
 | |
|   ]);
 | |
| }
 | 
