2024-07-03 10:37:53 +00:00
|
|
|
-- Fix oil absolute path to relative path conversion
|
|
|
|
vim.api.nvim_create_augroup('OilRelPathFix', {})
|
|
|
|
vim.api.nvim_create_autocmd('BufLeave', {
|
|
|
|
group = 'OilRelPathFix',
|
|
|
|
pattern = 'oil:///*',
|
|
|
|
callback = function()
|
|
|
|
vim.cmd 'cd .'
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
|
2024-05-20 14:30:34 +00:00
|
|
|
return {
|
|
|
|
'stevearc/oil.nvim',
|
|
|
|
-- Optional dependencies
|
|
|
|
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
|
|
|
config = function()
|
2024-08-01 08:50:36 +00:00
|
|
|
require('oil').setup({
|
|
|
|
view_options = {
|
|
|
|
show_hidden = true
|
|
|
|
}
|
|
|
|
})
|
2024-05-20 14:30:34 +00:00
|
|
|
vim.keymap.set('n', '<leader>fe', require('oil').open, { desc = '[F]ile [E]xplorer' })
|
|
|
|
end,
|
|
|
|
}
|