toggle oil.nvim fullscreen window

This commit is contained in:
Baipyrus 2024-08-01 10:58:47 +02:00
parent 12aa2d8a7b
commit 15d4cfcdf7

View File

@ -13,11 +13,19 @@ return {
-- Optional dependencies
dependencies = { 'nvim-tree/nvim-web-devicons' },
config = function()
require('oil').setup({
local oil = require 'oil'
oil.setup {
view_options = {
show_hidden = true
}
})
vim.keymap.set('n', '<leader>fe', require('oil').open, { desc = '[F]ile [E]xplorer' })
show_hidden = true,
},
}
vim.keymap.set('n', '<leader>fe', function()
if vim.bo.filetype == 'oil' then
oil.close()
else
oil.open()
end
end, { desc = '[F]ile [E]xplorer' })
end,
}