summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2024-01-03 00:01:16 +0100
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2024-01-03 00:01:16 +0100
commit17f0b61a7772e92dbd1daf35183b798377a5025c (patch)
treefc036e45f1a06abedba67b4c7242c5bd3c687ed2
parent6a4f4d904856f49f9d8b7b74a82dbaed6da32ebd (diff)
Set oil to float
-rw-r--r--fnl/plugins/editor/oil.fnl19
1 files changed, 6 insertions, 13 deletions
diff --git a/fnl/plugins/editor/oil.fnl b/fnl/plugins/editor/oil.fnl
index 1f09ec3..a15c22e 100644
--- a/fnl/plugins/editor/oil.fnl
+++ b/fnl/plugins/editor/oil.fnl
@@ -1,11 +1,5 @@
;; File explorer that lets you edit your filesystem.
-(local user-cmds [[:Oil
- (lambda []
- (let [oil (require :oil)]
- (oil.open)))
- {:nargs 0}]])
-
(local opts {:keymaps {:g? :actions.show_help
:<CR> :actions.select
:<C-s> :actions.select_vsplit
@@ -21,12 +15,11 @@
:gs :actions.change_sort
:gx :actions.open_external
:g. :actions.toggle_hidden
- "g\\\\" :actions.toggle_trash}})
-
-(local keys [{1 "-" 2 :<cmd>Oil<cr> :desc "Open parent directory"}])
+ "g\\\\" :actions.toggle_trash}
+ :float {:padding 1 :max_width 64 :max_height 32}})
-(fn init []
- (let [cmds (require :util.cmds)]
- (cmds.create-user-cmds user-cmds)))
+(local keys [{1 "-"
+ 2 "<cmd>lua require(\"oil\").open_float()<cr>"
+ :desc "Open parent directory"}])
-{1 :stevearc/oil.nvim : init : opts : keys}
+{1 :stevearc/oil.nvim : opts : keys}