emacs-neotree
emacs-neotree copied to clipboard
Expanded folder is indented when using "icons" theme
This isn't that important, but still probably not the desired behavior, hence I'm reporting it.
When using the icons
theme and expand a folder, the expanded folder gets "half-indented", which makes it look a bit out of place and almost as if it's within the folder showing directly above it.
With the games
folder collapsed:
And the games
folder expanded:
This seems to be an issue with the width of the "down arrow" icon! In the function neo-buffer--insert-fold-symbol
the code to draw the down arrow is: (insert (all-the-icons-icon-for-dir (directory-file-name node-name) "down")))
. If I change "down"
to "left"
then the spacing is correct:
It looks like the "left" and "right" icons are skinnier than the "up" and "down" icons.
[Edit: looks like a general "problem" with all-the-icons - https://github.com/domtronn/all-the-icons.el/issues/33]
[Edit 2: looking at the all-the-icons-icon-for-dir function, it takes another parameter "padding" that defaults to "\t". Changing that to a " " makes things look better for me (as well as changin the final \t to " " in the leaf format too). The tabs tend to push things out by a lot rather than a little
(or (and (equal name 'open) (insert (all-the-icons-icon-for-dir (directory-file-name node-name) "left" " ")))
(and (equal name 'close) (insert (all-the-icons-icon-for-dir (directory-file-name node-name) "right" " ")))
(and (equal name 'leaf) (insert (format "\t\t\t%s " (all-the-icons-icon-for-file node-name))))))
]