manateelazycat / lsp-bridge

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

Popup documentation (diagnostic) not working on hover #1097

Open Marx-A00 opened 3 weeks ago

Marx-A00 commented 3 weeks ago

Hey, this is my first time ever making an issue on github so be nice to me (:

Basically, I have not been able to get the diagnostic information to popup on hover at all, it worked literally once and it was blissful, but then stopped working and I have no idea why, or even how to diagnose it. Here is my config

  (unless (package-installed-p 'yasnippet)
    (package-install 'yasnippet))

  (add-to-list 'load-path "~/.dotfiles/.emacs.d/other-packages/lsp-bridge/")
  (unless (display-graphic-p)
    (add-to-list 'load-path "~/.dotfiles/.emacs.d/other-packages/popon/")
    (add-to-list 'load-path "~/.dotfiles/.emacs.d/other-packages/acm-terminal/"))

    (use-package lsp-bridge
          :load-path "~/.dotfiles/.emacs.d/other-packages/lsp-bridge/"        
          :after yasnippet                     ;; Ensure yasnippet is available
          :init
          ;; Require yasnippet and enable it globally before lsp-bridge loads
          (yas-global-mode 1)
          :config
          (setq lsp-bridge-python-command "~/miniconda3/envs/lsp-bridge/bin/python3")
          (setq lsp-bridge-enable-log nil)
          (setq lsp-bridge-enable-hover-diagnostic t)
          (global-lsp-bridge-mode)
          :bind
          (("s-<return>" . lsp-bridge-find-def)
           ("s-S-<return>" . lsp-bridge-find-def-other-window)))

  (add-hook 'emacs-startup-hook
        (lambda ()
          (require 'yasnippet)
          (yas-global-mode 1)

          (require 'lsp-bridge)
          (global-lsp-bridge-mode)

          (unless (display-graphic-p)
        (with-eval-after-load 'acm
          (require 'acm-terminal)))))

I am also running GNU Emacs 29.2 (build 1, aarch64-apple-darwin21.6.0, NS appkit-2113.60 Version 12.6.6 (Build 21G646)) of 2024-01-18

The only error that I've been able to find was this, which was at startup, but LSP still works fine, the hover just doesn't work.

[yas] Error in condition evaluation: Symbol’s function definition is void: js2-node-type [8 times]

If I do M-x lsp-bridge-diagnostic-list, it works fine and shows the diagnostic info in another buffer. Just wanna get it on hover. Please let me know if I should provide any more information. Thank you.

manateelazycat commented 2 weeks ago

Same as https://github.com/manateelazycat/lsp-bridge/issues/1081#issuecomment-2451151363 ?

Marx-A00 commented 1 week ago

I updated my lsp-bridge, and that error from #1081 has not happened again (Thank you so much!), but my hover-diagnostic still only works sometimes, and it's hard to even guess when it might work, seems to be random.

manateelazycat commented 1 week ago

hover diagnostic? I always use lsp-bridge-diagnostic-jump-next or lsp-bridge-diagnostic-jump-prev with keyboard, lsp-bridge haven't design diagnostic with mouse.