diff options
| author | beeb5k (Vivek Tiwari) <beebeeb5k@gmail.com> | 2026-06-04 20:25:23 +0530 |
|---|---|---|
| committer | beeb5k (Vivek Tiwari) <beebeeb5k@gmail.com> | 2026-06-04 20:25:23 +0530 |
| commit | bfe5ef76b95725451707f6061d5dfa5e3b024c61 (patch) | |
| tree | e61fd46ffbb77e131edbc0ffe1019cef2d7662a9 /lua/bee/plugins/oil.lua | |
| parent | 3ab5bbeda2c86b62999b5a662374c38e3ef0c01b (diff) | |
Use better Plugins
- codediff
- neogit
- nvim-surround
- hlchunk
- fff.nvim
- gitsigns
Diffstat (limited to 'lua/bee/plugins/oil.lua')
| -rw-r--r-- | lua/bee/plugins/oil.lua | 138 |
1 files changed, 68 insertions, 70 deletions
diff --git a/lua/bee/plugins/oil.lua b/lua/bee/plugins/oil.lua index 5f8c6d6..6a5e69b 100644 --- a/lua/bee/plugins/oil.lua +++ b/lua/bee/plugins/oil.lua @@ -1,72 +1,70 @@ return { - { - "oil.nvim", - lazy = true, - keys = { { "<leader>o", "<CMD>Oil<CR>", desc = "Open oil" } }, - auto_enable = true, - after = function() - vim.g.loaded_netrwPlugin = 1 - vim.keymap.set("n", "<leader>o", "<cmd>Oil .<CR>", { noremap = true, desc = "Open nvim root directory" }) - require("oil").setup({ - keymaps = { - ["-"] = "actions.parent", - ["<CR>"] = "actions.select", - ["<C-v>"] = "actions.select_vsplit", - ["<C-s>"] = "actions.select_split", - }, - vim.keymap.set("n", "<leader>o", "<cmd>Oil<cr>", { desc = "Open Oil" }), - - -- Oil will take over directory buffers (e.g. `vim .` or `:e src/`) - -- Set to false if you still want to use netrw. - default_file_explorer = true, - -- Id is automatically added at the beginning, and name at the end - -- See :help oil-columns - columns = { - "icon", - "permissions", - "size", - -- "mtime", - }, - -- Buffer-local options to use for oil buffers - buf_options = { - buflisted = false, - bufhidden = "hide", - }, - -- Window-local options to use for oil buffers - win_options = { - wrap = false, - signcolumn = "no", - cursorcolumn = false, - foldcolumn = "0", - spell = false, - list = false, - conceallevel = 3, - concealcursor = "nvic", - }, - -- Send deleted files to the trash instead of permanently deleting them (:help oil-trash) - delete_to_trash = false, - -- Skip the confirmation popup for simple operations (:help oil.skip_confirm_for_simple_edits) - skip_confirm_for_simple_edits = false, - -- Selecting a new/moved/renamed file or directory will prompt you to save changes first - -- (:help prompt_save_on_select_new_entry) - prompt_save_on_select_new_entry = true, - -- Oil will automatically delete hidden buffers after this delay - -- You can set the delay to false to disable cleanup entirely - -- Note that the cleanup process only starts when none of the oil buffers are currently displayed - cleanup_delay_ms = 2000, - lsp_file_methods = { - -- Time to wait for LSP file operations to complete before skipping - timeout_ms = 1000, - -- Set to true to autosave buffers that are updated with LSP willRenameFiles - -- Set to "unmodified" to only save unmodified buffers - autosave_changes = false, - }, - -- Constrain the cursor to the editable parts of the oil buffer - -- Set to `false` to disable, or "name" to keep it on the file names - constrain_cursor = "editable", - -- Set to true to watch the filesystem for changes and reload oil - experimental_watch_for_changes = false, - }) - end, - }, + { + "oil.nvim", + lazy = false, + keys = { { "<leader>o", "<CMD>Oil<CR>", desc = "Open oil" } }, + cmd = "Oil", + auto_enable = true, + after = function() + vim.g.loaded_netrwPlugin = 1 + require("oil").setup({ + keymaps = { + ["-"] = "actions.parent", + ["<CR>"] = "actions.select", + ["<C-v>"] = "actions.select_vsplit", + ["<C-s>"] = "actions.select_split", + }, + -- Oil will take over directory buffers (e.g. `vim .` or `:e src/`) + -- Set to false if you still want to use netrw. + default_file_explorer = true, + -- Id is automatically added at the beginning, and name at the end + -- See :help oil-columns + columns = { + "icon", + "permissions", + "size", + -- "mtime", + }, + -- Buffer-local options to use for oil buffers + buf_options = { + buflisted = false, + bufhidden = "hide", + }, + -- Window-local options to use for oil buffers + win_options = { + wrap = false, + signcolumn = "no", + cursorcolumn = false, + foldcolumn = "0", + spell = false, + list = false, + conceallevel = 3, + concealcursor = "nvic", + }, + -- Send deleted files to the trash instead of permanently deleting them (:help oil-trash) + delete_to_trash = false, + -- Skip the confirmation popup for simple operations (:help oil.skip_confirm_for_simple_edits) + skip_confirm_for_simple_edits = false, + -- Selecting a new/moved/renamed file or directory will prompt you to save changes first + -- (:help prompt_save_on_select_new_entry) + prompt_save_on_select_new_entry = true, + -- Oil will automatically delete hidden buffers after this delay + -- You can set the delay to false to disable cleanup entirely + -- Note that the cleanup process only starts when none of the oil buffers are currently displayed + cleanup_delay_ms = 2000, + lsp_file_methods = { + -- Time to wait for LSP file operations to complete before skipping + timeout_ms = 1000, + -- Set to true to autosave buffers that are updated with LSP willRenameFiles + -- Set to "unmodified" to only save unmodified buffers + autosave_changes = false, + }, + -- Constrain the cursor to the editable parts of the oil buffer + -- Set to `false` to disable, or "name" to keep it on the file names + constrain_cursor = "editable", + -- Set to true to watch the filesystem for changes and reload oil + experimental_watch_for_changes = false, + }) + end, + }, } |
