From 8296b55962c9157f7496d993e5666da6e780c90b Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Tue, 22 Oct 2024 14:49:39 +0200 Subject: [PATCH] move plugin related settings inside plugin config for consistency --- lua/custom/plugins/oil.lua | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lua/custom/plugins/oil.lua b/lua/custom/plugins/oil.lua index 01c9cdf..f9bae0e 100644 --- a/lua/custom/plugins/oil.lua +++ b/lua/custom/plugins/oil.lua @@ -1,19 +1,19 @@ --- 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', -- Optional dependencies dependencies = { 'nvim-tree/nvim-web-devicons' }, config = function() + -- 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, + }) + local oil = require 'oil' oil.setup { view_options = {