Skip to content

tui-icon being set to single space in treemacs doom-colors theme? #489

@kitchen

Description

@kitchen

I'm trying to get doom emacs working reasonably well in a terminal. It does. I think it can do better. One thing that has been bugging me is the treemacs view looks a bit ... off. It took me a while to realize why, but I think it's mostly because there are no icons or any other special indications of file types or even directories:

Screen Shot 2020-06-17 at 12 04 36 AM

I tried setting the theme to Default and suddenly I had something! It wasn't much, but at least I had little green + and - next to directories, making them visually easier to distinguish.

So I started digging, and it seems as though doom's "doom-atom" theme is entirely built up from scratch, which, ok, fine. I can add fallback tui icons to those things, no big.

But then I looked at the doom-colors theme and see some shenanigans. I'm very new to lisp, emacs lisp, and emacs in general, but as I understand it, this is looping through everything in the all-the-icons-icon-alist figuring out what the icon should be, looping through each extension, and setting the tui-icons and gui-icons hash table keys for the extension in the treemacs--current-theme theme.

There are a few problems here that I can think of and maybe one isn't a problem, but the other definitely is:

  1. treemacs--current-theme is not deterministic? Or is it in the scope of treemacs-create-theme? I'm thinking the idea was to do something sorta like inheriting the default theme into the doom-colors theme? The more I type on this line the less sure I understand what's happening. Feel free to ignore this point.
  2. But more importantly, it appears as though the tui-icon is being set to " " for every extension in the list. Specifically: lines 263 where the cons is being built, lines 266-267 where it's being split back up into the gui icon and the tui icon, and finally line 270 where the tui icon is being set in the hash table.

Is this intended? I believe it to be overwriting potentially existing tui icons with empty strings. I'd like to figure out a way to get a reasonable set of tui icons in place (perhaps a PR to all-the-icons, followed by a PR to here to pull those in? 🤷) but I also need to make sure I'm understanding what's here and the intent.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    is:bugSomething isn't working as intendedre:terminalOnly applies to Emacs in the terminalre:treemacs

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions