Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with lsp-ui doc? #49

Open
larebsyed opened this issue Dec 3, 2020 · 9 comments
Open

Compatibility with lsp-ui doc? #49

larebsyed opened this issue Dec 3, 2020 · 9 comments
Labels
configuration need to improve configuration

Comments

@larebsyed
Copy link

LSP UI Doc causes the main buffer to dim which shouldn't happen

@gonewest818 gonewest818 added the configuration need to improve configuration label Dec 3, 2020
@gonewest818
Copy link
Owner

yes, I've got lsp-ui enabled and I see this too. If you have a moment to experiment you could try adding this to your configuration.

(add-to-list 'dimmer-prevent-dimming-predicates #'lsp-ui-doc--frame-visible-p))

which is exactly what I'll be trying when I get a chance.

@thermopyle
Copy link

I tried that and it did not quite work, the main buffer is still dimmed when the lsp-ui popup is shown. But sometimes it seems to work, when I move around in the source file and the lsp-ui popup comes and goes sometimes the main buffer is not dimmed.

@gonewest818
Copy link
Owner

Well, it was worth a shot. I'll have to look in more detail. Fortunately this is one I can reproduce...

@VirgilSurin
Copy link

I have the same issue and the "hotfix" does not work.
Maybe excluding lsp-ui-doc window might work but I cannot find its name.

@VirgilSurin
Copy link

UPDATE/HOTFIX
I was messing up with the customization option for lsp-ui and I found out that when you toggle Lsp Ui Doc Use Childfram to off, whenever the doc promts, it does not trigger the dimmering of the main active buffer.

@thermopyle
Copy link

I can confirm this. A bit too early to say without more testing, but this could be an acceptable solution for me. I also think it looks better :-)

@gonewest818
Copy link
Owner

gonewest818 commented Feb 5, 2021 via email

@gonewest818
Copy link
Owner

Confirmed disabling lsp-ui-doc-use-childframe works around the issue for me too. I still want to solve the underlying issue though, so I'll keep this issue open.

@buzztaiki
Copy link

Hi,

In my environment, following snippet has been solved this issue.

(defun dimmer-lsp-ui-doc-p ()
  (string-prefix-p " *lsp-ui-doc-" (buffer-name)))
(add-to-list 'dimmer-prevent-dimming-predicates #'dimmer-lsp-ui-doc-p)

(defun advices/dimmer-config-change-handler ()
  (dimmer--dbg-buffers 1 "dimmer-config-change-handler")
  (let ((ignore (cl-some (lambda (f) (and (fboundp f) (funcall f)))
                         dimmer-prevent-dimming-predicates)))
    (dimmer-process-all (not ignore))))
(advice-add 'dimmer-config-change-handler :override #'advices/dimmer-config-change-handler)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
configuration need to improve configuration
Projects
None yet
Development

No branches or pull requests

5 participants