emacs-lsp / lsp-ui

UI integrations for lsp-mode
https://emacs-lsp.github.io/lsp-ui
GNU General Public License v3.0
1.04k stars 139 forks source link

Colors of side lines #500

Closed deb75 closed 3 years ago

deb75 commented 4 years ago

Hello,

I usually work with the solarized dark theme with which there is a good constrast between emacs background and sidelines. This is less true with the light theme, especially for the code actions which remains plain yellow and is just unreadable. Also, in the modeline, the code actions appear in cyan which has a poor constrat with the light theme.

Is there a way to customize the sideline colors ? at least the code actions colors would be enough for now.

Many thanks for this so nice piece of software (lsp-mode lsp-java, ...)

Regards

jcs090218 commented 4 years ago

I think you can customize these face variables that have declared in lsp-ui-sideline.el file.

I think these are the face variables that are related to sideline UI. Just in case if I missed anything, you can search defface keyword to look up the available faces' customization.

sebastiencs commented 4 years ago

@deb75 You can customize lsp-ui options and colors with:

[M-x] customize-group [ENTER] lsp-ui
jcs090218 commented 3 years ago

I think @sebastiencs has made changes for light theme friendly on commit 0243eb36c46d35ce0063718fe2eca0fcc6283913.

@deb75 Does it work for you? Thanks!

deb75 commented 3 years ago

Hi,

@jcs090218 : thanks for replying, currently in elpa/lsp-ui-20200916.1208 I have :

(defface lsp-ui-sideline-code-action
  '((((background light)) :foreground "DarkOrange")
    (t :foreground "yellow"))
  "Face used to highlight code action text."
  :group 'lsp-ui-sideline)

I use the package theme color-theme-sanityinc-solarized-20200805.603

When I set the theme to sanityinc-solarized-lightI guess code actions should appear in darkorange but the still appears (nearly unreadable) in yellow, but thanks to @sebastiencs answeer I made the change from yellow to darkorange.

It would be nice if the change could be automatic, was it this commit intention ?

EDIT : I try to understand how the lisp code above works, there are two settings for the foreground key, the first one depends on ((background light)), the other on t. I guess if I set ((background light)) to something suitable, "darkorgange" wil be preferred ?

Regards

jcs090218 commented 3 years ago

It would be nice if the change could be automatic, was it this commit intention ?

Yeah, I think that is the commit intention.

EDIT : I try to understand how the lisp code above works, there are two settings for the foreground key, the first one depends on ((background light)), the other on t. I guess if I set ((background light)) to something suitable, "darkorgange" wil be preferred ?

I think the code (background light) is the condition then the :foreground "DarkOrange is the result depends on the condition itself. t is the default case, hence the yellow will be the default value.

deb75 commented 3 years ago

Then, how come that the condition (background light) is not satisfied when I set the theme to light solarized ?

jcs090218 commented 3 years ago

Then, how come that the condition (background light) is not satisfied when I set the theme to light solarized ?

Yeah, I think code isn't working ATM?

sebastiencs commented 3 years ago

@deb75 Should be fixed with https://github.com/emacs-lsp/lsp-ui/commit/edb229fb774f0c2ebf00fe49c53baac5c0800e0a

I try to understand how the lisp code above works, there are two settings for the foreground key, the first one depends on ((background light)), the other on t. I guess if I set ((background light)) to something suitable, "darkorgange" wil be preferred ?

Yes, but t means use in all cases. In the last commit I replaced t with default

liuchong commented 3 years ago

Same issue which was made me changed my theme 🤣 image image

jcs090218 commented 3 years ago

I think #539 has resolved this issue? Can anyone check if the latest version works for you?

@liuchong @deb75

liuchong commented 3 years ago

Yeah...it's orange now, I noticed that the line order of codes in the above image is changed now. 👀 Thanks!

jcs090218 commented 3 years ago

Great! Close this issue now!

Feel free to reopen this issue if you find out necessary.