mirror of
https://github.com/tomru/nvim.git
synced 2026-03-03 14:37:15 +01:00
add oil
This commit is contained in:
27
lua/plugins/oil.lua
Normal file
27
lua/plugins/oil.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
return {
|
||||
{
|
||||
'stevearc/oil.nvim',
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||
config = function()
|
||||
require('oil').setup {
|
||||
columns = { 'icon' },
|
||||
keymaps = {
|
||||
['<C-h>'] = false,
|
||||
['<M-h>'] = 'actions.select_split',
|
||||
},
|
||||
view_options = {
|
||||
show_hidden = true,
|
||||
},
|
||||
}
|
||||
|
||||
-- Open parent directory in current window
|
||||
vim.keymap.set('n', '-', '<CMD>Oil<CR>', { desc = 'Open parent directory' })
|
||||
|
||||
-- Open parent directory in floating window
|
||||
vim.keymap.set('n', '<space>-', require('oil').toggle_float)
|
||||
|
||||
-- Shortcut for searching your neovim configuration files
|
||||
vim.keymap.set('n', '<leader>C', '<CMD>Oil' .. vim.fn.stdpath 'config' .. '<CR>', { desc = '[C]onfig' })
|
||||
end,
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user