3

I'm using GNU Emacs 30.1 on GNU/Linux with standard eglot and working with C++ code using clangd 20.1.4 as the LSP server.

Up until a short while ago (a month or two maybe? Not sure) when I put point on a variable in my code, the type of the variable would be displayed in the minibuffer. For example it would say something like uint64_t myFoo (I can't remember the exact format). I found this incredibly valuable.

But now when I put point on a variable, it doesn't show the type it just says variable myFoo which is pretty useless (I mean, yes, I can see that it's a variable!)

I also used to see the doxygen doc strings associated with my methods when I put point on a function or method call, but now it just says instance-method myFunc etc. Admittedly this was a mixed bag because it would show the docs in preference to any errors reported by flymake etc. which is frustrating. But still.

I don't remember changing anything that might cause this but maybe I did...? The conjunction of different ELisp packages etc. that are working together (?) to provide these advanced IDE services are so hard to tease out that I have no idea if it's even Eglot which is (or was) showing this information.

Anyone have pointers?

3
  • Looks like it's eldoc that's responsible for printing this stuff. I do see eglot methods in eldoc-documentation-functions and if I remove them then I don't even get the limited variable myFoo, so it seems like eldoc is working but eglot is not providing useful information in the displayed documentation, for some reason. Commented Apr 30 at 19:06
  • 1
    Hm, I see that if I use eldoc C-h . I see "all the deetz" in a separate window including the type. The first line is variable myFoo and of course that's all eldoc shows (by default). So I guess, something changed (maybe in clangd?) where the type used to be part of the first line, but now it no longer is. Am I interpreting this correctly? Does anyone have any elisp code that hacks the format of the textDocument/hover return value from clangd to have a more useful first line? Commented Apr 30 at 19:13
  • I had the same problem. Frustrating. As a workaround, I'm now using eldoc-box to show the rest of the lines. The new package eldoc-mouse can do this too. Commented Sep 29 at 0:12

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.