generated from ellisonleao/nvim-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 11
Integrations
SuperBo edited this page Nov 16, 2024
·
1 revision
Use this recipe to integrate with oil.nvim.
Lazy.nvim config
{
'stevearc/oil.nvim',
opts = {
keymaps = {
['<C-c>'] = 'actions.close',
['q'] = 'actions.close',
['gi'] = {
desc = 'Open in Fugit2',
callback = function()
local oil = require("oil")
local dir = oil.get_current_dir()
if dir then
oil.close()
vim.cmd("Fugit2 " .. dir)
end
end
}
}
},
dependencies = { 'nvim-tree/nvim-web-devicons' },
keys = {
{ '-', mode = 'n', '<cmd>Oil --float<cr>' }
}
}
or setup
require("oil").setup({
keymaps = {
['<C-c>'] = 'actions.close',
['q'] = 'actions.close',
['gi'] = {
desc = 'Open in Fugit2',
callback = function()
local oil = require("oil")
local dir = oil.get_current_dir()
if dir then
oil.close()
vim.cmd("Fugit2 " .. dir)
end
end
}
}
})