Closed AndreasMatthias closed 4 months ago
Looking into it.
I can't reproduce it locally. I did however recently fix a fringe-indicator issue that might be related. Can you check if https://github.com/Alexander-Miller/treemacs/commit/923fbbdea57b27ed3293079b13846206add85d9d helps on your end?
It's still the same. No difference.
It's not a big issue, but I wonder why you cannot reproduce this effect. Maybe the depending packages of treemacs or org-extra-emphase make a difference?
There's another think that might be related: After starting emacs the hl-line
(light green background) is missing in the treemacs buffer. But after the very first keystoke it appears magically. This seems to me like some initialization code is not running in my setup.
I can replicate this with an even easlier startup file:
start.el:
(require 'package)
(package-initialize)
(use-package treemacs)
(treemacs)
emacs -Q -l start.el
It's not your setup, hl-line is bound to post-command-hook, and the fringe indicator is bound to hl-line. Without an interactive command there is no initialization.
This one was fun to figure out - the fringe indicator wouldn't show up unless you manually call redisplay
:vomiting_face: .
I've created a special starter to deal with this case. Try it out first, if it works for you I'll push it to master:
;;;###autoload
(defun treemacs-start-on-boot (&optional focus-treemacs)
"Initializer specifically to start treemacs as part of your init file.
Ensures that all visual elements are present, which might otherwise be lacking
because their setup isn't run when treemacs isn't started from an interactive
command.
FOCUS-TREEMACS indicates whether the treemacs window should be focussed."
(-let [initial-window (selected-window)]
(treemacs)
(hl-line-highlight)
(redisplay)
(unless focus-treemacs (select-window initial-window))))
Yes, it's working smoothly now. Thank you very much.
I'm facing a minor issue with
treemacs-fringe-indicator-mode
. Here is an example:File test.el:
After starting Emacs with
the fringe indicator is missing at first. But it appears after switching to another window and back again, and seems to be working correctly from now on.
Note that the order of loading these packages is crucial. This issue does not happen if
treemacs-magit
is loaded beforeorg-extra-emphasis
.