manateelazycat / lsp-bridge

A blazingly fast LSP client for Emacs
GNU General Public License v3.0
1.36k stars 197 forks source link

enabling lsp-bridge breaks syntax highlighting #905

Closed Cadair closed 1 week ago

Cadair commented 2 months ago

Hello,

I am running doom emacs, with lsp-bridge enabled. If I include lsp-bridge in my config when I edit files in python-mode (and maybe others, but I mainly use python) the syntax highlighting goes completely insane until I re-run M-x python-mode.

I know this is a terrible bug report, but any suggestions on how I can get you more information would be helpful, I don't really know where to start.

Thanks!

manateelazycat commented 2 months ago

Can you give me a minimal reproducible configuration, minimal test code, and a stable reproducible method?

I don't use Doom Emacs

Cadair commented 2 months ago

Hi! Thanks for getting back to me, I have started trying to build a docker contain which can reproduce the issue here: https://github.com/Cadair/lsp-bridge-doom-debugging/

unfortunately I haven't managed to reproduce the syntax highlighting bug because I get this error on load when I unclude by lsp-bridge module:

Debugger entered--Lisp error: (wrong-number-of-arguments ((t) (r g b) (format "#%02x%02x%02x" (ash r -8) (ash g -8) (ash b -8$
  (closure (t) (r g b) (format "#%02x%02x%02x" (ash r -8) (ash g -8) (ash b -8)))()                                           
  apply((closure (t) (r g b) (format "#%02x%02x%02x" (ash r -8) (ash g -8) (ash b -8))) nil)                                  
  acm-frame-color-blend("unspecified-bg" "#AAAAAA" 0.9)                                                                       
  (set-face-background 'acm-frame-default-face (acm-frame-color-blend default-background blend-background (if is-dark-mode 0.$
  (progn (set-face-background 'acm-frame-default-face (acm-frame-color-blend default-background blend-background (if is-dark-$
  (if (or force (equal (face-attribute 'acm-frame-default-face :background) 'unspecified)) (progn (set-face-background 'acm-f$
  (let* ((is-dark-mode (string-equal (acm-frame-get-theme-mode) "dark")) (blend-background (if is-dark-mode "#000000" "#AAAAA$
  acm-frame-init-colors(t)                                                                                                    
  acm-reset-colors(doom-one t)                                                                                                
  apply(acm-reset-colors (doom-one t))                                                                                        
  load-theme(doom-one t)                                                                                                      
  (progn (load-theme doom-theme t))                                                                                           
  (if (and doom-theme (not (custom-theme-enabled-p doom-theme))) (progn (load-theme doom-theme t)))                           
  doom-init-theme-h()                                                                                                         
  run-hooks(after-init-hook delayed-warnings-hook)                                                                            
  command-line()                                                                                                              
  normal-top-level()    

Do you have any thoughts on what could be causing that? If I don't include the lsp-bridge module in the init.el file then it doesn't happen and doom starts up fine.

manateelazycat commented 2 months ago

This is a problem with the theme. Please change the theme and test again.