Skip to content

Mouse movement invokes commands and lsp-ui-doc popup disappears #795

Description

@rytswd

I'm using a separate frame for lsp-ui-doc, but with this issue, I cannot focus the frame, nor scroll any of the popup, as any mouse movement would clear out the doc popup.
It is also related to #532, where any mouse movement cancels active isearch.

The installation is nothing special, here is my use-package definition

  (use-package lsp-ui
    :after lsp-mode
    :commands lsp-ui-mode
    :custom
    (lsp-ui-sideline-enable nil)
    (lsp-ui-imenu-auto-refresh 'after-save)
    (lsp-ui-doc-position 'bottom)
    (lsp-ui-doc-side 'right)
    (lsp-ui-doc-show-with-cursor nil)
    (lsp-ui-doc-show-with-mouse nil)
    (lsp-ui-doc-max-height 25)
    (lsp-ui-doc-max-width 60)
    :hook
    ((lsp-ui-imenu-mode . (lambda ()
                            (hide-mode-line-mode 1)
                            ))
     )
    )

This seems to be both caused by the same track-mouse handling, and the simplest way to fix in a buffer was to (setq-local track-mouse nil). I got a potential fix with AI generated solution, which may give us a pointer for how this can be handled correctly for various use cases. At least the fix I've got works for me, so I'm opening a PR with that.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions