From bfe5ef76b95725451707f6061d5dfa5e3b024c61 Mon Sep 17 00:00:00 2001 From: "beeb5k (Vivek Tiwari)" Date: Thu, 4 Jun 2026 20:25:23 +0530 Subject: Use better Plugins - codediff - neogit - nvim-surround - hlchunk - fff.nvim - gitsigns --- lua/bee/plugins/oil.lua | 138 ++++++++++++++++++++++++------------------------ 1 file changed, 68 insertions(+), 70 deletions(-) (limited to 'lua/bee/plugins/oil.lua') 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 = { { "o", "Oil", desc = "Open oil" } }, - auto_enable = true, - after = function() - vim.g.loaded_netrwPlugin = 1 - vim.keymap.set("n", "o", "Oil .", { noremap = true, desc = "Open nvim root directory" }) - require("oil").setup({ - keymaps = { - ["-"] = "actions.parent", - [""] = "actions.select", - [""] = "actions.select_vsplit", - [""] = "actions.select_split", - }, - vim.keymap.set("n", "o", "Oil", { 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 = { { "o", "Oil", desc = "Open oil" } }, + cmd = "Oil", + auto_enable = true, + after = function() + vim.g.loaded_netrwPlugin = 1 + require("oil").setup({ + keymaps = { + ["-"] = "actions.parent", + [""] = "actions.select", + [""] = "actions.select_vsplit", + [""] = "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, + }, } -- cgit v1.3.1