elihunter173 / dirbuf.nvim

A file manager for Neovim which lets you edit your filesystem like you edit text
GNU Affero General Public License v3.0
423 stars 7 forks source link

Feature: Custom actions #51

Closed sayanarijit closed 1 year ago

sayanarijit commented 1 year ago

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.

andrewferrier commented 1 year ago

The first already exists: https://github.com/elihunter173/dirbuf.nvim/blob/ac7ad3c8e61630d15af1f6266441984f54f54fd2/doc/dirbuf.txt#L110

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.

sayanarijit commented 1 year ago

Nice. Thanks 👍