Fork me on GitHub
#emacs
<
2022-05-01
>
Drew Verlee04:05:09

My emacs mini buffer function hints are broken. It seems like a couple thinks are competing to use it and what ends up winning in just the displaying the symbol name my cursor is on. Any ideas how i can debug this? Like if i hover over clojure.core/spit i get "spit" in the minibuffer.

pavlosmelissinos06:05:33

describe-mode tells you which minor modes are active in the current buffer. If you disable them all and re-enable them one by one you'll find out which one is causing it. I've had a similar issue with highlight-symbol-mode (but I'd get the number of occurrences instead of the symbol name). I solved it by overriding a function.

genmeblog14:05:41

I have the same problem. Sometimes... I suspected lsp but now I suspect iedit. Will be investigating soon.

genmeblog20:05:20

@U0DJ4T5U1 have you figured out what was the reason? I failed 😕 It's so undeterministic in my case.

Drew Verlee21:05:42

I'll check if it's still an issue...

genmeblog15:05:39

ok, looks like it's lsp-mode, @UKFSJSM38 seems that eldoc and highlighting (multiple) interfere together, still not 100% sure about that. I'll try to record some examples soon.

ericdallo15:05:52

I know of a conflict of lsp and cider, that's why I have cider-eldoc-display-for-symbol-at-point as nil on my config

genmeblog15:05:56

Thanks, I'll verify this.

genmeblog15:05:21

Still I observe really strange behaviour.

genmeblog15:05:40

(map |) ;; nothing in minibuffer, lens shows [invalid arity]
(map| ) ;; the same
(map |) ;; minibuffer displays doc
(map identity|) ;; minibuffer shows doc for identity
(map identity |) ;; the same
(map identity [|]) ;; the same (identity)
(map identity [1 2]|) ;; the same
() ;; minibuffer shows `map` docs (sic!) 

ericdallo15:05:57

that's a clojure-lsp issue, regarding using outdated analysis, not sure there is a easy fix for that, but a issue makes sense on clojure-lsp

Carlo10:05:47

I use defn-like macros to add spec information. Would there be a way of font-locking them as the original defn?

Carlo11:05:58

Here's a solution:

(font-lock-add-keywords
 'clojure-mode
 '(("(\\(>defn\\)\\s-+\\(\\w+\\)"
    (1 font-lock-keyword-face)
    (2 font-lock-function-name-face))))