Fork me on GitHub
#lsp
<
2023-03-01
>
Akiz10:03:11

Hi, I updated LSP and I canโ€™t start EGLOT with large projects (it works fine with simple projects) anymore. Do you have an idea what might be an issue? I even tried to raise eglotโ€™s timeout from 90s to 300s and it did not help.

Akiz10:03:55

Changing timeout to 400 helped. Something must got slow ๐Ÿ™‚

otfrom10:03:56

I have my timeout set to 600, which is more than it has needed, but does consistently work

๐Ÿ‘ 1
ericdallo12:03:19

oh, eglot has a timeout for startup? really? ๐Ÿ˜”

ericdallo12:03:02

if so, increasing is the way, the first time you open a project should be slower since will compute whole classpath + analyze it, next startups should be fast.

borkdude12:03:09

Maybe there should be a page with eglot tips and tricks for clojure-lsp

๐Ÿ‘ 1
ericdallo12:03:12

We have this https://clojure-lsp.io/clients/#emacs page, we could add a eglot subsection of emacs, PR welcome

Akiz12:03:49

Yeah, first time is always slower. The codebase got bigger since I installed previous lsp, so this need for bigger timeout might not be not related to clojure-lsp at all ๐Ÿ˜…

ericdallo12:03:44

there is https://github.com/clojure-lsp/clojure-lsp/issues/1363to make clojure-lsp startup instant and analysis as async, which would make this eglot timeout not needed, I intend to work on that soon, but it's not that trivial

mpenet12:03:37

which version of eglot are you using? the one published in elpa?

mpenet12:03:07

(I am using this one and I noticed absolutely no change after the recent clojure-lsp update)

Akiz12:03:40

Yeah, the latest version. Good to hear that!

mpenet12:03:48

odd. maybe try to nuke the various caches (./.lsp/.cache & the kondo one)

Akiz14:03:55

@mpenet I think it is just that one of my project get much bigger so original timeout was not enough.

hiredman01:03:38

Ooo I haven't seen consult-eglot

mpenet08:03:58

it's nice on paper, but quite slow in practice

mpenet08:03:19

I prefer consult-git-grep for this

mpenet08:03:27

which is lightning fast

mpenet08:03:03

thinking of it, I suppose consult has a way to hook onto xref-find-apropos

mpenet08:03:09

might be the better solution

mpenet08:03:39

there's imenu but it only shows candidates from buffers

mpenet08:03:45

yes: (setq xref-find-apropos #'consult-xref), but no previews ๐Ÿ˜ž

mpenet08:03:29

C-u M-. is much better

mpenet09:03:02

I came up with this: https://github.com/mpenet/emax/commit/1f2e52f5a6e830e4863841e65893a0dac68ac296 I don't really like the default binding, most my code navigation fns are under M-j <something>

mpenet09:03:15

integrates nicely with consult too

otfrom09:03:54

If I'm going to be using eglot and terminal stuff, I think this is the bit of eldoc functionality I really need to learn: https://www.masteringemacs.org/article/seamlessly-merge-multiple-documentation-sources-eldoc

mpenet09:03:35

I read about this, but I don't use that

otfrom09:03:54

that being eldoc?

otfrom09:03:42

(which I know isn't the same as what you were talking about with xref)

mpenet09:03:19

I guess it depends what you're trying to achieve

mpenet09:03:50

I just care about doc when I type something and it auto-completes, then I get the doc to show after a small delay next to the completion popup

mpenet09:03:03

iirc it's corfu-popupinfo-mode

mpenet09:03:22

otherwise I just jump to its def if I want to know more

otfrom10:03:34

yeah, I've still got some issues with corfu-popupinfo given that I need this to work in the terminal https://github.com/minad/corfu/issues/248

mpenet10:03:21

right, won't work there

mpenet10:03:32

I don't bother with the terminal to run emacs personally

otfrom10:03:32

it is really good for pair and mob programming in tmate when set up right

otfrom10:03:37

takes a bit to set it up right though

otfrom10:03:04

there are lots of things I like to do that only work in X/Wayland tho, so I need both to work well

mpenet10:03:15

we usually "pair" just using google meet ๐Ÿ™‚ and one set of hands as control. It's tricky to share an emacs configuration anyway imho

mpenet10:03:23

but if that works for you

otfrom10:03:39

ah, I have new emacs victims that I get to inflict my config on. We find w/meet that the text can get a bit fuzzy so even if we are just sharing for viewing we still do it in tmate