casouri / eldoc-box

childframe doc for eglot and anything that uses eldoc
359 stars 26 forks source link

eldoc-box-help-at-point not displaing the correct docs #92

Closed leafarbelm closed 11 months ago

leafarbelm commented 11 months ago

I'm trying to add a key bind to eldoc-box-help-at-point but first it dind't show the frame so i add it to the eldoc-box-self-insert-command-list and its showing now but it shows the wrong docs when using the key bind but if i way to display automatically it works correct, here's the config:

 (use-package eldoc-box
  :after eglot
  :bind ("C-M-;" . eldoc-box-help-at-point)
  :hook (eglot-managed-mode . eldoc-box-hover-at-point-mode)
  :custom
  (eldoc-idle-delay 10)
  :config
  (add-to-list 'eldoc-box-self-insert-command-list 'scroll-other-window)
  (add-to-list 'eldoc-box-self-insert-command-list 'scroll-other-window-down)
  (add-to-list 'eldoc-box-self-insert-command-list 'eldoc-box-help-at-point))

I also notice it only works after it shows the docs automatically at least one time before that i get the following error:

funcall-interactively: Wrong type argument: stringp, nil

I'm doing something wrong?

casouri commented 11 months ago

Hmm, try removing eldoc-idle-delay, or set it to something less than 1. I think that's the reason why you are seeing outdated doc.

leafarbelm commented 11 months ago

Hi, it actually worked but I'm trying to remove the auto pop-up to have the docs only popping up when i press the key that's why a had a long eldoc-idle-delay time, any ideas on how i can accomplish this?

casouri commented 11 months ago

Then you should turn off eldoc-box-hover-at-point-mode, eldoc-box-help-at-point along will do what you want.

leafarbelm commented 11 months ago

Thanks! its working great now, congrats in the package!