From 6bef8f32b19778fdfe52f0eb39719425508dcc7b Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Thu, 24 Apr 2025 11:36:39 +0300 Subject: Refactored nvim config to make it easier and less insanely nested --- .config/nvim/lua/plugins/oil.lua | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .config/nvim/lua/plugins/oil.lua (limited to '.config/nvim/lua/plugins/oil.lua') diff --git a/.config/nvim/lua/plugins/oil.lua b/.config/nvim/lua/plugins/oil.lua new file mode 100644 index 0000000..7b7521d --- /dev/null +++ b/.config/nvim/lua/plugins/oil.lua @@ -0,0 +1,40 @@ +return { + 'stevearc/oil.nvim', + dependencies = { 'nvim-tree/nvim-web-devicons' }, + keys = { { 'fo', 'Oil', desc = '[F]ilesystem [O]il' } }, + opts = { + delete_to_trash = true, + default_file_explorer = true, + skip_confirm_for_simple_edits = true, + keymaps = { + ['gs'] = false, + [''] = false, + [''] = false, + [''] = false, + [''] = false, + [''] = 'actions.select_split', + [''] = 'actions.select_vsplit', + [''] = 'actions.refresh', + ['Q'] = 'actions.close', + ['gS'] = 'actions.change_sort', + ['gy'] = 'actions.copy_to_system_clipboard', + ['gp'] = 'actions.paste_from_system_clipboard', + }, + view_options = { + show_hidden = true, + natural_order = true, + }, + + lsp_file_methods = { + -- Enable or disable LSP file operations + enabled = true, + -- 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, + }, + }, + cmd = 'Oil', + event = 'VimEnter', +} -- cgit v1.3.1