Alexander-Miller / treemacs

GNU General Public License v3.0
2.09k stars 154 forks source link

:after-collapse and :after-expand in treelib #1054

Closed kurnevsky closed 1 year ago

kurnevsky commented 1 year ago

I'm trying to migrate lsp-metals from treemacs-extensions to treemacs-treelib. In order to do that I need :after-expand and :after-collapse properties - lsp server needs to know when nodes are expanded/collapsed. It seems there is no such thing in treelib, or is there a workaround?

Alexander-Miller commented 1 year ago

Not possible yet. I'll start working on it now.

Alexander-Miller commented 1 year ago

Pushed a first version. Let me now if it works for you.

kurnevsky commented 1 year ago

It works fine, thanks. One unrelated thing I wanted to ask - why does treemacs set background explicitly for icons? It seems it can just specify :mask 'heuristic to be transparent, see https://www.gnu.org/software/emacs/manual/html_node/elisp/Image-Descriptors.html

Alexander-Miller commented 1 year ago

Maybe the feature wasn't around when I was looking for it back then, or maybe my google-fu is bad. Either way handling the background via this property saves me a few hundred lines of code, so thanks for the tip!