78f2f22

Branches > main > 78f2f22 > files

Load oil on path

Grahp, 2026-02-02

Commit: 78f2f22e7e0996e2e38384f8ed39b954a2184c10
Parent: 70d2ef9

2 changed files:

nvim/init.lua modified (view file)

@@ -1,5 +1,3 @@-local fn = vim.fn- vim.loader.enable()  require("colors")@@ -9,8 +7,9 @@ require("opts")  -- For some reason this still isn't quite working?-if fn.isdirectory(fn.argv(0)) == 1 then-  require("plugins.oil").open()+if vim.fn.isdirectory(vim.fn.argv(0)) == 1 then+  print(vim.fn.argv(0))+  require("plugins.oil").open(vim.fn.argv(0)) end  vim.schedule(function() require("keybindings") end)@@ -22,8 +21,6 @@ --- Parens (Parinfer) --- Formatting (better formatting anyway :p) ---- Bug: Oil isn't loaded when using `nvim dir`, which means nothing shows up :p- --- Also: --- Looking at java stuff (where does that come from and how could I improve it?) --- Surround?

nvim/lua/plugins/oil.lua modified (view file)

@@ -5,8 +5,12 @@                       watch_for_changes = true,                       view_options = {show_hidden = true}}) -local function open()-  vim.cmd("Oil")+local function open(path)+  if path then+    vim.cmd("Oil " .. path)+  else+    vim.cmd("Oil")+  end end  return {open = open}