Fork me on GitHub
#lsp
<
2021-09-22
>
mpenet08:09:27

is there a way to get eldoc display only the fn signature of what at point (single line)?

mpenet08:09:13

a bit like cider does when you have eldoc enabled and a repl running

mpenet08:09:03

I see it does it but only when you have the cursor on the symbol, not after

mpenet08:09:11

ex (foo |)

mpenet08:09:20

maybe I just need that fix actually

mpenet08:09:47

... which is not released yet

borkdude09:09:31

yeah, that's supposed to fix it

mpenet09:09:15

working now, thanks

mpenet09:09:59

hmm not always

mpenet09:09:04

seems a bit glitchy

mpenet09:09:52

yeah cider is better at this one, it would also highlight the current arg you're on

mpenet09:09:52

glitch : sometimes it would just keep showing a previous signature when the code actually changed

mpenet09:09:15

ex type something, delete it, write (filter ), it still shows previous signature

borkdude09:09:58

then this should probably be reported and improved

mpenet09:09:08

also if the hint wasn't shown by hovering the symbol first it wont show at all

borkdude09:09:36

I've worked with Eric on this also from the clj-kondo side. I think making an issue would be good.

mpenet09:09:37

yeah I ll open an issue later

mpenet09:09:59

i ll revert to the previous version in the meantime

mpenet09:09:40

on some projects autocomplete will just not work too

mpenet09:09:49

nothing special to note in lsp buffers

mpenet09:09:14

now yes, maybe it was crunching stuff

mpenet09:09:49

ah no, it's broken now. weird, same buffer, worked for a while then nothing

borkdude09:09:24

@mpenet @ericdallo recently told me that you can do lsp-clojure-cursor-info to see what lsp knows about this location

borkdude09:09:32

this info ends up in the Messages buffer

borkdude09:09:45

perhaps this helps somehow

mpenet09:09:02

there's a defn defined just before the cursor, autocomplete doesn't work on it when I type the first char (nor does it match a require with the same prefix)

mpenet09:09:29

the odd thing:

mpenet09:09:41

same buffer/session, I go down a bit in the buffer and magic it works there

mpenet09:09:10

difficult to create a minimal case quickly, it's on an internal thing

ericdallo12:09:39

The eldoc issue is something I'm aware but it's not simple to solve as we would need to parse the code with rewrite-clj everytime and this could cause performance issues, so for now we are just relying on kondo analysis