From 8a17c5ad8014c986b647d7b71b32210336df81b2 Mon Sep 17 00:00:00 2001 From: Michael Housh Date: Sun, 17 Nov 2024 09:00:59 -0500 Subject: [PATCH] feat: Adds oil.nvim and removes neo-tree --- nvim/m-housh/lua/user/plugin/neo-tree.lua | 52 +++++++++++------------ nvim/m-housh/lua/user/plugin/oil.lua | 29 +++++++++++++ 2 files changed, 55 insertions(+), 26 deletions(-) create mode 100644 nvim/m-housh/lua/user/plugin/oil.lua diff --git a/nvim/m-housh/lua/user/plugin/neo-tree.lua b/nvim/m-housh/lua/user/plugin/neo-tree.lua index a600778..728cd75 100755 --- a/nvim/m-housh/lua/user/plugin/neo-tree.lua +++ b/nvim/m-housh/lua/user/plugin/neo-tree.lua @@ -1,26 +1,26 @@ -return { - "nvim-neo-tree/neo-tree.nvim", - branch = "v3.x", - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-tree/nvim-web-devicons", -- not strictly required, but recommended - "MunifTanjim/nui.nvim", - }, - opts = { - close_if_last_window = false, - enable_git_status = true, - enable_diagnostics = true, - filesystem = { - always_show = { - "plugins", - ".zshrc", - ".zshenv", - "*.env" - }, - filtered_items = { - hide_dotfiles = false - }, - use_libuv_file_watcher = true - }, - } - } +-- return { +-- "nvim-neo-tree/neo-tree.nvim", +-- branch = "v3.x", +-- dependencies = { +-- "nvim-lua/plenary.nvim", +-- "nvim-tree/nvim-web-devicons", -- not strictly required, but recommended +-- "MunifTanjim/nui.nvim", +-- }, +-- opts = { +-- close_if_last_window = false, +-- enable_git_status = true, +-- enable_diagnostics = true, +-- filesystem = { +-- always_show = { +-- "plugins", +-- ".zshrc", +-- ".zshenv", +-- "*.env" +-- }, +-- filtered_items = { +-- hide_dotfiles = false +-- }, +-- use_libuv_file_watcher = true +-- }, +-- } +-- } diff --git a/nvim/m-housh/lua/user/plugin/oil.lua b/nvim/m-housh/lua/user/plugin/oil.lua new file mode 100644 index 0000000..9cb74fd --- /dev/null +++ b/nvim/m-housh/lua/user/plugin/oil.lua @@ -0,0 +1,29 @@ +return { + "stevearc/oil.nvim", + dependencies = { + "nvim-tree/nvim-web-devicons", + }, + config = function() + require("oil").setup({ + columns = { "icon" }, + keymaps = { + [""] = false, + [""] = "actions.select_split", + }, + view_options = { + --show_hidden = true, + is_hidden_file = function(name, bufnr) + -- Don't show .DS_STORE in output. + local is_ds_store = name ~= ".DS_Store" + return not is_ds_store + end, + }, + }) + + -- Show the parent directory in current window. + vim.keymap.set("n", "-", "Oil", { desc = "Open parent directory." }) + + -- Open parent directory in floating window. + vim.keymap.set("n", "-", require("oil").toggle_float) + end, +}