oil.nvim relative path fix on open file

This commit is contained in:
Baipyrus 2024-07-03 12:37:53 +02:00
parent b138a01336
commit cacb564101

View File

@ -1,3 +1,13 @@
-- 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 = {},