Treemacs display long file names

treemacs manipulates directories handily:

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

Screenshot%20from%202019-05-29%2017-35-19

if turn on the visual-line-mode

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

Screenshot%20from%202019-05-29%2017-34-45

In contrast, Neotree is a little better

Screenshot%20from%202019-05-29%2017-40-01

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,写出来这一行代码真不容易.