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 140 forks source link

Can't resize sideline fonts #580

Closed ianyepan closed 3 years ago

ianyepan commented 3 years ago

I'd like the sideline fonts to be smaller. I tried almost every solution I found online, including:

(set-face-attribute 'lsp-ui-sideline-global nil :height 0.75)

; and

(custom-set-faces '(lsp-ui-sideline-global ((t (:height 0.75)))))

For reference, this is the font size I'd like to shrink in the screenshot below:

image

jcs090218 commented 3 years ago

By seeing the document string from variable lsp-ui-sideline-global,

(defface lsp-ui-sideline-global
  '((t))
  "Face which apply to all overlays.
This face have a low priority over the others."
  :group 'lsp-ui-sideline)

Try customize variable lsp-ui-sideline-code-action instead.

ianyepan commented 3 years ago

I tried something like

  (custom-set-faces '(lsp-ui-sideline-code-action ((t (:height 85)))))

but sadly saw no effect.

jcs090218 commented 3 years ago

Duplicate of #561. See if the comment helps?

Close this for duplicate issue.

ianyepan commented 3 years ago

Unfortunately, that comment didn't help. It caused new bugs to insert text at the beginning of the buffer

ianyepan commented 2 years ago

I tried the following snippet:

  (set-face-attribute 'lsp-ui-sideline-global nil         :family "Segoe UI Variable Static Small" :italic t :height 0.8)
  (set-face-attribute 'lsp-ui-sideline-code-action nil    :family "Segoe UI Variable Static Small" :italic t :height 0.8)
  (set-face-attribute 'lsp-ui-sideline-symbol-info nil    :family "Segoe UI Variable Static Small" :italic t :height 0.8)
  (set-face-attribute 'lsp-ui-sideline-symbol nil         :family "Segoe UI Variable Static Small" :italic t :height 0.8)
  (set-face-attribute 'lsp-ui-sideline-current-symbol nil :family "Segoe UI Variable Static Small" :italic t :height 0.8)

However, only the "family" attribute is changed. I am seeing no italic or height difference. I cannot locate which face is overriding these lsp-ui faces. I even went into the lsp-ui-sideline source code to change the heights from 0.99 to 0.8 and byte compiled it, yet still no height change.

font family changes, but no italics or height change

image

ianyepan commented 2 years ago

friendly ping :)