emacs-lsp / lsp-treemacs

lsp-mode :heart: treemacs
GNU General Public License v3.0
396 stars 46 forks source link

icon issues with doom themes #89

Open eeshugerman opened 3 years ago

eeshugerman commented 3 years ago

original issue: https://github.com/hlissner/emacs-doom-themes/issues/500

looks like this: Screen Shot 2021-01-20 at 12 42 33 PM should look like this: Screen Shot 2021-01-20 at 12 41 30 PM

the problem is not present until lsp-mode is enabled.

note: the discussion here picks up where we left off in what turned out to be an unrelated lsp-treemacs issue: https://github.com/emacs-lsp/lsp-treemacs/issues/66

eeshugerman commented 3 years ago

The icons that are needlessly overridden in lsp-treemacs-icons would need to be examined

@nbfalcon so is this just a matter of comparing the "Default" icon list in lsp-treemacs vs that in treemacs? not sure i'm on the right track.

nbfalcon commented 3 years ago

That is a start. However, we must also consider all-the-icons, which might have additional icons.

eeshugerman commented 3 years ago

hmm, might be on the wrong track here. it seems my test of your triage branch was flawed: if i checkout upstream/master the issue is still "resolved", so the commented-out treemacs-modify-theme form doesn't seem to be what's making the difference.

rather it would seem to have something to do with how i'm installing lsp-treemacs from my git clone, which is by adding (package-install-file "~/devel/misc/lsp-treemacs") in my dotspacemacs/user-config, just before (doom-themes-treemacs-config).

🤔 i'll keep experimenting

edit: replacing (package-install-file "~/devel/misc/lsp-treemacs") with (package-reinstall 'lsp-treemacs) also works

seagle0128 commented 3 years ago

Same issue here. If not loading lsp-treemacs-themes, the issue disappears. I think it should not modify "Default" theme directly. Creating a new one will avoid the conflicts.

nbfalcon commented 3 years ago

@eeshugerman have you reloaded lsp-treemacs-themes?

eeshugerman commented 3 years ago

reloading the library after the issue is visible does nothing, but if i do (load-library "lsp-treemacs-themes") in my config (where i was reinstalling before) and restart, the issue never appears.

that's actually a very pleasant workaround! :)

seagle0128 commented 3 years ago

My workaround is

(with-eval-after-load 'lsp-treemacs
          (doom-themes-treemacs-config))
ig-perez commented 3 years ago

Same issue with a vanilla Emacs installation: image LICENSE and poetry.lock icons are too big and moved to the left.

I guess previous workarounds are for Doom Emacs, I have tried both workarounds and didn't help.

Thanks

seagle0128 commented 3 years ago

@ig-perez The workaround is loading doom-themes-ext-treemacs after lsp-treemacs. Try evaluating the buffer of doom-themes-ext-treemacs.

jul1u5 commented 3 years ago

I tried @seagle0128 original workaround on Doom Emacs and it didn't seem to help.

(with-eval-after-load 'lsp-treemacs
          (doom-themes-treemacs-config))

However, it seems the following worked:

(after! lsp-treemacs
  (load-library "doom-themes-ext-treemacs"))
ig-perez commented 3 years ago

Thanks @seagle0128 I tried:

(with-eval-after-load 'lsp-treemacs (doom-themes-ext-treemacs))

But I got: Error processing message (void-function doom-themes-ext-treemacs)

@jul1u5 are you under Doom right?

jul1u5 commented 3 years ago

@ig-perez Yes, I am using Doom and I think I got the same error with that workaround. Have you tried using the load-library one?

ig-perez commented 3 years ago

Hey @jul1u5 I tried and well, in some way it solved the problem by disappearing the icons: image

So, I'm still with this issue.

jul1u5 commented 3 years ago

Sorry, I don't see what's wrong here. Should .properties or .lock files have custom icons?

It looks the same for me, I thought that's how the icons are supposed to look like 😀

EDIT: Oh, I see there's a red lock icon for .lock files

ig-perez commented 3 years ago

Yeah, these are the icons: image

They look good, the only thing is the size/alignment. They should be the same size and at the same level of pyproject.toml :)

seagle0128 commented 3 years ago

Thanks @seagle0128 I tried:

(with-eval-after-load 'lsp-treemacs (doom-themes-ext-treemacs))

But I got: Error processing message (void-function doom-themes-ext-treemacs)

@jul1u5 are you under Doom right?

My configurations:

(use-package doom-themes
        :custom-face
        (doom-modeline-buffer-file ((t (:inherit (mode-line bold)))))
        :custom
        (doom-themes-treemacs-theme "doom-colors")
        :init (centaur-load-theme centaur-theme t)
        :config
        ;; Enable flashing mode-line on errors
        (doom-themes-visual-bell-config)

        ;; Enable customized theme
        ;; FIXME https://github.com/emacs-lsp/lsp-treemacs/issues/89
        (with-eval-after-load 'lsp-treemacs
          (doom-themes-treemacs-config)))

Use the latest doom-themes.

ig-perez commented 3 years ago

Thanks @seagle0128 , all of this is confusing. Let me try to summarize.

treemacs default theme looks like this: image

The yellow folder icons are dissonant with doom-themes, so I guess it is better to enable the configuration for treeemacs with (doom-themes-treemacs-config) from the beggining, not only after LSP.

But when I do that, the icons look unaligned as shown initially: image image

The proposed fix will keep original treemacs theme and just activates the doom-themes after LSP mode. This is odd since I use treemacs not only for LSP, I'd prefer a smother experience keeping the same doom-themes look and feel wherever I go in Emacs. Moreover it seems it is replacing the original treemacs icons with smaller ones: image

So the thing is (IMO):

Now I'm doubtful, is this an issue with treemacs or doom-themes. Which package is replacing the treemacs icons?

seagle0128 commented 3 years ago

@ig-perez The fact is if disabling or uninstalling lsp-treemacs, all icons are correct. There should be some conflicts.