emacs-lsp / lsp-mode

Emacs client/library for the Language Server Protocol
https://emacs-lsp.github.io/lsp-mode
GNU General Public License v3.0
4.81k stars 892 forks source link

lsp-haskell echo minibuffer not displaying type information #1571

Open shroomist opened 4 years ago

shroomist commented 4 years ago

Describe the bug echo minibuffer not displaying type information. In fact it does display for a split of a second and it's gone. https://filebin.net/aw1fvlg205a8gy2k

To Reproduce

emacs -q -l lsp-start-plain.el
import System.Environment

main :: IO ()
main = getArgs >>= print . haqify . head
haqify s = "Haq! " ++ s

Expected behavior Type information remains visible while the cursor is at item.

Which Language Server did you use lsp-haskell

OS osx

Error callstack No errors

yyoncho commented 4 years ago

@alanz have you seen anything like that?

alanz commented 4 years ago

I do not normally get type information in the mini-buffer, to be honest. And when I did my morning package upgrade I see that haskell-mode just updated on melpa, perhaps that is the source of the change?

codygman commented 4 years ago

I recall this type information showing up in the minibuffer as well, but now it just shows the symbol name by itself. That implies to me that maybe the new lsp-mode is putting the symbol there while the type information in status buffer is put there by haskell-mode before lsp-mode so it effectively gets overriden.

cheeze2000 commented 4 years ago

I can confirm that this happened to me after doing M-x lsp with lsp-haskell. This is what happens when I hover over putStrLn. flicker The definition in the minibuffer flickers but it will stay the moment I do M-x lsp-disconnect.

Is there any way to prevent this from happening? Perhaps there is a way to disable lsp-mode from overriding?

fishmonger45 commented 3 years ago

Any updates on this? I'm running into the exact same issue as cheeze2000 on a fresh install of emacs on arch. I'd just like some type information any way possible even a workaround. peek

walseb commented 3 years ago

@wqsz7xn Are you sure your problem isn't that you don't have lsp-ui enabled? I don't see the lsp sidebar. Anyway if you do and you really want the type info to appear in the minibuffer, I made this hack a year ago that basically just steals the type info from the sidebar https://github.com/walseb/QualityEmacsConfig/blob/fcc51829f0b685338714c67b0496983a43efde82/config.el#L7026 I have no idea if it works anymore though

fishmonger45 commented 3 years ago

Solved. Turns out that I had manually disabled lsp-ui-doc in my .emacs. Yeah I guess you shouldn't do that if you want doc comments huh ;)