treemacs icon indicating copy to clipboard operation
treemacs copied to clipboard

Customizing actions

Open AndreasMatthias opened this issue 2 years ago • 1 comments

How do i customize the action for opening certain file types?

Suppose that beside opening an HTML file for editing I'd also want to open this file with eaf-open (from Emacs Application Framework).

AndreasMatthias avatar Jan 18 '24 22:01 AndreasMatthias

Not possible without some legwork. You can either use treemacs-after-visit-functions that I have recently added. If that's not a good fit write your own simple ret-action that does something like

(-let [btn (treemacs-current-button)]
  (treemacs-visit-node-no-split)
  (eaf-open (treemacs-button-get btn :path)))

Alexander-Miller avatar Jan 26 '24 06:01 Alexander-Miller

This issue has been automatically marked as stale because it has not had recent activity (this bot only works as a reminder, it will not close issues).

stale[bot] avatar Mar 30 '24 06:03 stale[bot]

I'll close here on account of inactivity. Feel free to re-open if this issue is still relevant.

Alexander-Miller avatar May 17 '24 12:05 Alexander-Miller