Alexander-Miller / treemacs

GNU General Public License v3.0
2.05k stars 151 forks source link

Customizing actions #1086

Closed AndreasMatthias closed 1 month ago

AndreasMatthias commented 5 months ago

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).

Alexander-Miller commented 5 months ago

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)))
stale[bot] commented 3 months ago

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).

Alexander-Miller commented 1 month ago

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