mirror of
https://github.com/Baipyrus/nvim-config.git
synced 2024-12-27 22:01:45 +00:00
21 lines
522 B
Lua
21 lines
522 B
Lua
-- 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,
|
|
})
|
|
|
|
return {
|
|
'stevearc/oil.nvim',
|
|
opts = {},
|
|
-- Optional dependencies
|
|
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
|
config = function()
|
|
require('oil').setup()
|
|
vim.keymap.set('n', '<leader>fe', require('oil').open, { desc = '[F]ile [E]xplorer' })
|
|
end,
|
|
}
|