summaryrefslogtreecommitdiff
path: root/fnl/plugins/editor/oil.fnl
diff options
context:
space:
mode:
Diffstat (limited to 'fnl/plugins/editor/oil.fnl')
-rw-r--r--fnl/plugins/editor/oil.fnl27
1 files changed, 27 insertions, 0 deletions
diff --git a/fnl/plugins/editor/oil.fnl b/fnl/plugins/editor/oil.fnl
new file mode 100644
index 0000000..e326663
--- /dev/null
+++ b/fnl/plugins/editor/oil.fnl
@@ -0,0 +1,27 @@
+;; File explorer that lets you edit your filesystem.
+
+(local keymaps {:g? :actions.show_help
+ :<CR> :actions.select
+ :<C-s> :actions.select_vsplit
+ :<C-h> :actions.select_split
+ :<C-t> :actions.select_tab
+ :<C-p> :actions.preview
+ :<C-c> :actions.close
+ :<C-l> :actions.refresh
+ :- :actions.parent
+ :_ :actions.open_cwd
+ "`" :actions.cd
+ "~" :actions.tcd
+ :gs :actions.change_sort
+ :gx :actions.open_external
+ :g. :actions.toggle_hidden
+ "g\\\\" :actions.toggle_trash})
+
+(fn config []
+ (let [oil (require :oil)]
+ (oil.setup {: keymaps})
+ (vim.keymap.set :n "-" (fn []
+ (oil.open))
+ {:desc "Open parent directory"})))
+
+{1 :stevearc/oil.nvim : config :event :VeryLazy}