add new plugins
This commit is contained in:
parent
d6ad2d0ef7
commit
4bce08bc22
13 changed files with 479 additions and 322 deletions
34
lua/custom/plugins/oil.lua
Normal file
34
lua/custom/plugins/oil.lua
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
return {
|
||||
{
|
||||
'stevearc/oil.nvim',
|
||||
opts = {},
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||
config = function()
|
||||
require('oil').setup {
|
||||
default_file_explorer = true,
|
||||
skip_confirm_for_simple_edits = true,
|
||||
columns = { 'icon' },
|
||||
keymaps = {
|
||||
['<C-h>'] = false,
|
||||
['<M-h>'] = 'actions.select_split',
|
||||
},
|
||||
view_options = {
|
||||
show_hidden = true,
|
||||
natural_order = true,
|
||||
is_always_hidden = function(name, bufnr)
|
||||
return name == '..' or name == '.git'
|
||||
end,
|
||||
},
|
||||
win_options = {
|
||||
wrap = 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)
|
||||
end,
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue