Open JPRuehmann opened 4 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).
I don' think a general hook is the right approach, as that means you'd call treemacs
for every new prog buffer, especially the ones you don't expect to derive from prog-mode. You'd need to add some extra config to make sure treemacs opens only once.
It might be easier to integrate treemacs with your projectile workflow - how exactly do you open your projects?
Via click on the Link in the Dashboard.
In that case you need to find out what function this click invokes. Maybe there is already a hook for it, maybe you need to use advice. Either way you need something like this:
(defun open-treemacs-after-click ()
(save-selected-window (treemacs-select-window)))
(add-hook 'dashboard-after-click-hook #'open-treemacs-after-click)
(advice-add #'dashboard-click :after #'open-treemacs-after-click)
Hello I try to find a Way to open treemacs automaticaly with prog-mode. I've tried
:hook (prog-mode . treemacs)
and:init (add-hook 'pog-mode-hook 'treemacs
. But both did not work, instead a second Window (scratch) with treemacs gets opened beside the dashboard at startup.My Goal is to get treemacs started at opening a project with projectile. Thanks,