diff --git a/config/nvim/lazy-lock.json b/config/nvim/lazy-lock.json index b730643..65ad204 100644 --- a/config/nvim/lazy-lock.json +++ b/config/nvim/lazy-lock.json @@ -26,6 +26,7 @@ "nvim-treesitter-refactor": { "branch": "master", "commit": "65ad2eca822dfaec2a3603119ec3cc8826a7859e" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "dd0b2036c3a27cb6e6486f8bd24188c6ca43af0b" }, "nvim-web-devicons": { "branch": "master", "commit": "313d9e7193354c5de7cdb1724f9e2d3f442780b0" }, + "oil.nvim": { "branch": "master", "commit": "bf753c3e3f8736939ad5597f92329dfe7b1df4f5" }, "omnisharp-extended-lsp.nvim": { "branch": "main", "commit": "4be2e8689067494ed7e5a4f1221adc31d1a07783" }, "playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" }, "plenary.nvim": { "branch": "master", "commit": "4f71c0c4a196ceb656c824a70792f3df3ce6bb6d" }, diff --git a/config/nvim/lua/fschauen/plugins/oil.lua b/config/nvim/lua/fschauen/plugins/oil.lua new file mode 100644 index 0000000..65ec40c --- /dev/null +++ b/config/nvim/lua/fschauen/plugins/oil.lua @@ -0,0 +1,44 @@ +local M = { 'stevearc/oil.nvim' } + +M.cmd = 'Oil' + +M.dependencies = { 'nvim-tree/nvim-web-devicons' } + +M.keys = { + { 'o', 'Oil' }, +} + +M.config = function() + require('oil').setup { + default_file_explorer = true, + + columns = { + 'icon', + 'permissions', + 'size', + 'mtime', + }, + + constrain_cursor = 'name', + + keymaps = { + -- Not using because Visual Block mode is useful in an Oil buffer. + [''] = 'actions.select_vsplit', + + [''] = 'actions.select_split', + [''] = 'actions.select_split', + [''] = false, -- Disable default keymap for 'actions.select_split'. + + [''] = 'actions.refresh', + + ['q'] = 'actions.close', + }, + + view_options = { + show_hidden = true, + }, + } +end + +return M +