feat: added oil
This commit is contained in:
		
							parent
							
								
									c18f9a132f
								
							
						
					
					
						commit
						2b754cccc0
					
				| 
						 | 
					@ -0,0 +1,28 @@
 | 
				
			||||||
 | 
					return {
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    'stevearc/oil.nvim',
 | 
				
			||||||
 | 
					    ---@module 'oil'
 | 
				
			||||||
 | 
					    ---@type oil.SetupOpts
 | 
				
			||||||
 | 
					    opts = {},
 | 
				
			||||||
 | 
					    -- Optional dependencies
 | 
				
			||||||
 | 
					    dependencies = { { 'echasnovski/mini.icons', opts = {} } },
 | 
				
			||||||
 | 
					    -- dependencies = { 'nvim-tree/nvim-web-devicons' }, -- use if you prefer nvim-web-devicons
 | 
				
			||||||
 | 
					    -- Lazy loading is not recommended because it is very tricky to make it work correctly in all situations.
 | 
				
			||||||
 | 
					    lazy = false,
 | 
				
			||||||
 | 
					    config = function()
 | 
				
			||||||
 | 
					      require('oil').setup {
 | 
				
			||||||
 | 
					        columns = { 'icon' },
 | 
				
			||||||
 | 
					        keymaps = {
 | 
				
			||||||
 | 
					          ['<C-h>'] = false,
 | 
				
			||||||
 | 
					          ['<M-h>'] = 'actions.select_split',
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        view_options = {
 | 
				
			||||||
 | 
					          show_hidden = true,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      vim.keymap.set('n', '-', '<CMD>Oil<CR>', { desc = 'Open Parent directory' })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      vim.keymap.set('n', '<space>-', require('oil').toggle_float)
 | 
				
			||||||
 | 
					    end,
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Loading…
	
		Reference in New Issue