Treemacs display long file names

treemacs manipulates directories handily:

but it’s awkward to display long file names without auto truncating.


if turn on the visual-line-mode

[![enter image description here][2]][2]


In contrast, Neotree is a little better


Since neotree is marked as obsolete in melpa libs.

How could display long file’s names in treemacs as it does in neotree?

(setq truncate-lines t)

But I don’t know how to set it only in treemacs.

1 个赞
(add-hook 'treemacs-mode-hook  (lambda () (setq-local truncate-lines t)))
1 个赞

搜了一圈 setq-local, truncate-lines,写出来这一行代码真不容易.