Add plugin: oil file system editor and explorer
This commit is contained in:
parent
5aeddfdd5d
commit
0280f7279c
2 changed files with 31 additions and 0 deletions
30
lua/kickstart/plugins/oil.lua
Normal file
30
lua/kickstart/plugins/oil.lua
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
return {
|
||||
{ -- Oil filesystem editor and explorer
|
||||
'stevearc/oil.nvim',
|
||||
dependencies = {
|
||||
-- Useful for getting pretty icons, but requires a Nerd Font.
|
||||
{ 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font },
|
||||
},
|
||||
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 directorv' })
|
||||
|
||||
-- Open parent directory in floating window
|
||||
vim.keymap.set('n', '<space>-', require('oil').toggle_float)
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
-- The line beneath this is called `modeline`. See `:help modeline`
|
||||
-- vim: ts=2 sts=2 sw=2 et
|
||||
Loading…
Add table
Add a link
Reference in a new issue