mirror of
				https://github.com/NotAShelf/nvf.git
				synced 2025-10-31 02:52:37 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			53 lines
		
	
	
	
		
			1.7 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			53 lines
		
	
	
	
		
			1.7 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
| {lib, ...}: let
 | |
|   inherit (lib.options) mkEnableOption mkOption;
 | |
|   inherit (lib.types) bool;
 | |
|   inherit (lib.nvim.binds) mkMappingOption;
 | |
|   inherit (lib.nvim.types) mkPluginSetupOption luaInline;
 | |
|   inherit (lib.generators) mkLuaInline;
 | |
| in {
 | |
|   options.vim.navigation.harpoon = {
 | |
|     mappings = {
 | |
|       markFile = mkMappingOption "Mark file [Harpoon]" "<leader>a";
 | |
|       listMarks = mkMappingOption "List marked files [Harpoon]" "<C-e>";
 | |
|       file1 = mkMappingOption "Go to marked file 1 [Harpoon]" "<C-j>";
 | |
|       file2 = mkMappingOption "Go to marked file 2 [Harpoon]" "<C-k>";
 | |
|       file3 = mkMappingOption "Go to marked file 3 [Harpoon]" "<C-l>";
 | |
|       file4 = mkMappingOption "Go to marked file 4 [Harpoon]" "<C-;>";
 | |
|     };
 | |
| 
 | |
|     enable = mkEnableOption "Quick bookmarks on keybinds [Harpoon]";
 | |
| 
 | |
|     setupOpts = mkPluginSetupOption "Harpoon" {
 | |
|       defaults = {
 | |
|         save_on_toggle = mkOption {
 | |
|           type = bool;
 | |
|           default = false;
 | |
|           description = ''
 | |
|             Any time the ui menu is closed then we will save the
 | |
|             state back to the backing list, not to the fs
 | |
|           '';
 | |
|         };
 | |
|         sync_on_ui_close = mkOption {
 | |
|           type = bool;
 | |
|           default = false;
 | |
|           description = ''
 | |
|             Any time the ui menu is closed then the state of the
 | |
|             list will be sync'd back to the fs
 | |
|           '';
 | |
|         };
 | |
|         key = mkOption {
 | |
|           type = luaInline;
 | |
|           default = mkLuaInline ''
 | |
|             function()
 | |
|               return vim.loop.cwd()
 | |
|             end
 | |
|           '';
 | |
|           description = ''
 | |
|             How the out list key is looked up. This can be useful
 | |
|             when using worktrees and using git remote instead of file path
 | |
|           '';
 | |
|         };
 | |
|       };
 | |
|     };
 | |
|   };
 | |
| }
 | 
