aboutsummaryrefslogtreecommitdiffstats
path: root/nvim/lua/plugins/oil.lua
blob: 20ce22f2ed5971dcfa18dd436300dec3daca887c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
return {
    'stevearc/oil.nvim',
    dependencies = 'nvim-tree/nvim-web-devicons',
    opts = {},
    keys = { {
        "<leader>ef",
        function()
            local filetype = vim.o.ft
            if filetype == "oil" then
                vim.cmd('q')
            else
                vim.cmd('topleft vsplit +Oil')
            end
            -- TODO: check for other open oil instances
        end,
        desc = "Open Oil file explorer in a far left split, similar to :Lexplore"
    } },
    cmd = "Oil"
}