diff options
Diffstat (limited to 'mut/neovim')
| -rw-r--r-- | mut/neovim/fnl/conf/events.fnl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mut/neovim/fnl/conf/events.fnl b/mut/neovim/fnl/conf/events.fnl index 4e03df8..dcc73a2 100644 --- a/mut/neovim/fnl/conf/events.fnl +++ b/mut/neovim/fnl/conf/events.fnl @@ -63,6 +63,14 @@ (lint.try_lint) (vim.schedule #(vim.diagnostic.setloclist {:open false})))}) +(event + [:BufEnter] + {:group "conf#events" + :callback + #(do (var dir (vim.fn.fnamemodify (vim.fn.expand "%") ":h")) + (if (vim.startswith dir "oil://") (set dir (dir:sub (+ 1 (length "oil://"))))) + (vim.cmd (.. "silent !lf -remote \"send cd '" dir "'\"")))}) + (local session-file (.. vim.env.HOME "/.vimsession.vim")) (event |
