has anyone here found that clojure-lsp / lsp-mode in emacs significantly slows down slurping and barfing expressions with smartparens?
@rickmoynihan This can be related to
company-idle-delay 0.5
If you set that to 0 things slowed down for me@borkdude what do you have it to set to?
0.5
Also update to the newest, there might have been some improvements around this
ahh great upgrading seems to have made a big difference!
thanks! 🙇
ah it could also be that lsp-mode is no longer connecting hmmmm
anyone here know how to debug lsp not connecting anymore after an upgrade?!
Running
$ clojure-lsp
{}
appears to error like troubleshooting says it shouldhowever nothing appears in the log
@rickmoynihan the troubleshooting should be self explanatory otherwise we can improve it, but if the executable is working we need to understand why it's crashsing
check the *clojure-lsp-stderr*
buffer if has any thing relevant
otherwise we need to check the log
usually it's on /tmp/clojure-lsp.*.out
Yeah I went through the troubleshooting section but nothing seemed to help
the emacs buffers for logs etc didn’t seem to exist either
what is the error you receive on emacs?
no visible error — just LSP[Disconnected]
in the mode line
and no lsp features
what happens when you M-x
lsp
aha!
lsp--path-to-uri: Symbol's function definition is void: -compose
(I was running M-x lsp-mode
)
TLDR update your dash.el package and everything should work
ok that seems to work
thanks a million! 🙇
You're welcome 😉
hmm now get apply: Cannot open load file: No such file or directory, lsp-ui
I suggest you re install your packages
That’s what got me here 😆
but yeah I’ll try reinstall again…
ok seems to be working
🙇
recently updated lsp, and it seems like unused vars no longer highlight, but if i do a lsp-lens-show i can see it has 0 references
am i missing something config-wise?
We didn't change anything related to that, check this section to see if it works for you: https://clojure-lsp.github.io/clojure-lsp/troubleshooting/#wrong-diagnosticslint
hm, no dice… :thinking_face:
pretty sure this is just me misunderstanding how the unused checking works
clj-kondo will look for private unused vars, and this wasn’t a private var. unfortunately whoever wrote the code im working on was not very judicious in their application of adding private metadata
I don't get it the error, do you have a small sample?
sure,
(ns foo)
(defn bar [])
(defn- baz [])
So clj-kondo should report only the unused private function baz, right?
yes
but i could swear globally unused publics highlighted awhile back
i may be mistaken
oh yeah
we used to have those for public functions before clj-kondo integration (2020 december)
i guess i understand why it’s not a clj-kondo thing, but it is useful when removing dead code
for instance, of course you don’t want your public API fns highlighted, but then again, i would assume those have a test…
yeah, for sure, it's something we lost when using clj-kondo, but I think we could implement it
need some hammock time though how to do it
@borkdude lsp already supports info lint, green color
nice. how does it do the local highlighting?
But I think we don't use on clojure-lsp for any feature
the local highlighting is a custom thing for highlighting on lsp-mode side
ok, we could do an info-level "warning" maybe
enable it by default, and if people complain offer a way to disable it
yes, I think it's the best option
continuing the convo from #clj-kondo: eh, i’m not 100% sure on highlight v warn. i’ll say i’m biased because i was used to a warning-like indicator in the old clojure-lsp. I think lens is neat, but where I found the previous underline helpful was when i was cruising around in a file and it was like “oh look, someone left some dead code here…”
the info lint is just like the warn lint but green not yellow
oh, that sounds great
yay! big thanks!
maybe a better name {:unused-public-var {:level :info}}
so you can add more stuff to it and also :exclude
stuff
maybe using a regex, namespace, fully qualified var
yeah, that looks perfect 🙂
I think I saw that pattern somewhere 😛
;)
carve has a .carve/ignore file: https://github.com/borkdude/carve so you can interactively add it to the list of ignored vars
@devn 🙂
I would put "var" instead of "variable", that is the proper name or clojure vars
but looks nice!