elihunter173/dirbuf.nvim

Feature: Custom actions

sayanarijit opened this issue · 2 comments

A simple API to get the hovered or selected paths (absolute) along with their IDs so that I can perform custom actions on them.

A simple API to bind the custom actions to key bindings when in the directory buffer.

The first already exists:

dirbuf.get_cursor_path() *dirbuf.get_cursor_path()*

The second is straightforward - use vim.keymap.set() in after/ftplugin/dirbuf.lua with buffer = true. I don't think it needs a specific API. You can find an example in my config.

Nice. Thanks 👍