From c434ebd510adda0d52b5900b5ce2c2022b36cd01 Mon Sep 17 00:00:00 2001 From: Ray Andrew <4437323+rayandrew@users.noreply.github.com> Date: Wed, 2 Aug 2023 18:38:10 -0500 Subject: [PATCH] change oil to be lazy --- lua/rayandrew/plugins.lua | 10 ++++++++++ lua/rayandrew/remap.lua | 3 --- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lua/rayandrew/plugins.lua b/lua/rayandrew/plugins.lua index 5538c9a..69039e0 100644 --- a/lua/rayandrew/plugins.lua +++ b/lua/rayandrew/plugins.lua @@ -220,6 +220,16 @@ return { { "stevearc/oil.nvim", + cmd = { "Oil" }, + keys = { + { + "-", + function() + require("oil").open() + end, + desc = "Open parent directory", + }, + }, opts = { default_file_explorer = true, restore_win_options = true, diff --git a/lua/rayandrew/remap.lua b/lua/rayandrew/remap.lua index a4e97bd..9dc69b0 100644 --- a/lua/rayandrew/remap.lua +++ b/lua/rayandrew/remap.lua @@ -132,6 +132,3 @@ Util.map("t", "", "close", { desc = "which_key_ignore" }) -- lazy Util.map("n", "l", "Lazy", { desc = "Lazy" }) - --- oil -vim.keymap.set("n", "-", require("oil").open, { desc = "Open parent directory" })