diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2022-07-02 03:14:04 +0200 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2022-07-02 03:14:04 +0200 |
commit | 1b534d96b4689145770363cc6c6877ca7e41a904 (patch) | |
tree | 742d0b0ec36fcc142b756fc5c3df032a5966d68d /fnl/config/lir.fnl | |
parent | efffe8b9c1e9ce06a58614a4f433f5139efb5d7d (diff) |
Add lir
Diffstat (limited to 'fnl/config/lir.fnl')
-rw-r--r-- | fnl/config/lir.fnl | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/fnl/config/lir.fnl b/fnl/config/lir.fnl new file mode 100644 index 0000000..8713b08 --- /dev/null +++ b/fnl/config/lir.fnl @@ -0,0 +1,42 @@ +;; Simple file manager. +(module config.lir {autoload {util util nvim aniseed.nvim}}) + +(defn- opts [actions mark-actions clipboard-actions] + {:show_hidden_files false + :devicons_enable true + :mappings {:l actions.edit + :<C-s> actions.split + :v actions.vsplit + :<C-t> actions.tabedit + :h actions.up + :q actions.quit + :A actions.mkdir + :a actions.newfile + :r actions.rename + "@" actions.cd + :Y actions.yank_path + :i actions.toggle_show_hidden + :d actions.delete + :J (fn [] + (mark-actions.toggle_mark) + (vim.cmd "normal! j")) + :c clipboard-actions.copy + :x clipboard-actions.cut + :p clipboard-actions.paste} + :float {:winblend 0 + :curdir_window {:enable false :highlight_dirname true} + :win_opts (fn [] + (let [width (math.floor (* vim.o.columns 0.7)) + height (math.floor (* vim.o.lines 0.7))] + {:border :rounded : width : height}))} + :hide_cursor false + :on_init (fn [] + (nvim.buf_set_keymap 0 :x :J + ":<C-u>lua require(\"lir.mark.actions\").toggle_mark(\"v\")<CR>" + {:noremap true :silent true}))}) + +(let [lir (util.load-plugin :lir)] + (let [actions (require :lir.actions) + mark-actions (require :lir.mark.actions) + clipboard-actions (require :lir.clipboard.actions)] + (lir.setup (opts actions mark-actions clipboard-actions)))) |