Fork me on GitHub
#emacs
<
2022-09-21
>
dev-hartmann09:09:15

Hey folks, as I am preparing my emacs for my new full time clojure job (🎉🎉🎉) I'm pondering if switching from Lsp to eglot is actually something worth pursuing

dev-hartmann09:09:58

I was hoping to have lease dependencies and use more emacs internal stuff and hopefully get an increase in performance

dev-hartmann09:09:18

Did any of you switch or have any insight on this to share?

ericdallo12:09:55

@U976F1AR2 did that a year or so ago

dev-hartmann12:09:11

How did it go? Easy? Have you been happy with eldoc reporting or are you using eldoc-box or something else entirely?

kpav14:09:56

I made the switch somewhat recently, it was pretty easy. Also, I am using eldoc-box, just because I dont always like eldoc to be in the minibuffer, but im sure it would be fine without it

kpav14:09:00

Im not sure if there were any increases in performance, but I like that eglot uses mostly built-in functionality

ericdallo14:09:42

Anyone knows how good is eldoc-box comparing with posframe?

Akiz18:09:22

I enjoyed Eglot for a long time but i went back to lsp-mode because I was missing this one a lot https://github.com/joaotavora/eglot/issues/661

Akiz18:09:27

And DAP mode is a nice bonus 🙂

ericdallo19:09:23

Oh, good to know that @UBRV1HXPD! find definition of external dependencies including java stuff that clojure-lsp now supports seems quite important

👍 1
dev-hartmann19:09:33

Thanks for the input folks

dev-hartmann19:09:17

Is there a resource forbidding dap mode with clojure?

dev-hartmann19:09:29

(Newbie to dap mode in general)

Akiz19:09:46

@U0J8XN37Y So far I have used DAP only with C, unfortunately I don’t know any resources regarding Clojure.

dev-hartmann19:09:45

@UBRV1HXPD nevermind, I go through the dap-mode readme 👌:skin-tone-4:

dev-hartmann19:09:45

Found that on the lsp document site 😅

Akiz19:09:33

@U0J8XN37Y At first glance, it seemed to me that it only concerns Java.

Akiz19:09:19

Cider is enough for Clojure, though, so I guess that’s okay.

dev-hartmann19:09:36

Looks like one needs to configure the jvm for debug info

dev-hartmann19:09:55

Just curious about debugging tools

dev-hartmann19:09:43

Need to further my knowledge with cider too

ericdallo19:09:26

there is no dap-server for clojure... yet :)

ericdallo19:09:49

I thought about creating a clojure-dap, didn't have the time yet

ericdallo19:09:00

but cider debugging is quite nice

dev-hartmann10:09:32

Thanks for all the input! I‘m looking at the cider debugging documentation right now

dev-hartmann10:09:20

@UKFSJSM38 my emacs-lisp fu is not very deep, but I'd love to help out and learn 🦾

dev-hartmann10:09:39

If in any case you want to start the clojure-dap 😅

dev-hartmann10:09:18

Just saw that cider debugger had conditional breakpoints, which is super awesome

ericdallo12:09:00

@U0J8XN37Y the good news is dap-mod eos already done, we just need the server side of dap which could be in any lang including clojure :)

dev-hartmann15:09:26

That sounds good, is there any resource you could share on how that's done? I'd love to give it a shot

dev-hartmann15:09:17

Awesome, thx! Will have a look at that

macrobartfast19:09:04

If there any projectile users here… C-p seems to immediately show a list of files to jump to… I think I’m supposed to be able to add another key to tell projectile what to do (i.e. ‘r’ for replace) but r just narrows the list to files that have r in the name. Thoughts?

pavlosmelissinos19:09:22

C-p does nothing on my emacs. What's the name of the command? projectile-switch-to-buffer?

pavlosmelissinos19:09:29

I think you need projectile-replace

macrobartfast19:09:40

aha… you’ve helped me with my question…

macrobartfast19:09:56

so, I guess, projectile comes with built in bindings somehow…

macrobartfast19:09:34

C-p does in fact do something projectiley in my setup… let me look at my .init.el

pavlosmelissinos19:09:44

C-h c and then type C-p to see the command it runs

macrobartfast19:09:45

aha… so I had added:

(define-key evil-normal-state-map (kbd "C-p") 'helm-projectile)
(define-key evil-normal-state-map (kbd "C-c a") 'helm-projectile-ag)
(define-key evil-normal-state-map (kbd "C-c s") 'helm-projectile-switch-project)
(define-key evil-normal-state-map (kbd "C-c b") 'list-buffers)

macrobartfast19:09:17

and that’s probably a projectile antipattern as the documentation above suggests that I’ve gone outside of somekind of baked in binding scheme of theirs.

macrobartfast19:09:33

that’s probably what I need to set up properly.

macrobartfast19:09:47

so I just need to bind C-p to projectile-commander, apparently, instead of helm-projectile (but we’ll see).

macrobartfast19:09:44

I’m as always confused by projectile vs helm-projectile and so on.

pavlosmelissinos20:09:22

Most of these libraries aren't even needed imho. Just use the built-in packages until you're sure they don't cut it for you. One of my resolutions for 2023 will be to trim down my init.el 😉

macrobartfast20:09:46

that is actually sound advice… both for emacs and clojure.

macrobartfast20:09:03

I mean, I reach for libraries when I could use built in features.

pavlosmelissinos20:09:43

This year I switched from ido to ivy+a bunch of other packages that supposedly "enhance" it. Sure, the result was fancier than what I had before, e.g. searches are on another level but on the other hand the new setup breaks more frequently and I don't even use most of what the packages offer :man-shrugging:

macrobartfast20:09:07

that is awesome, and I totally support it.

macrobartfast21:09:07

spacemacs is probably something I should look at, but I’m holding out.

macrobartfast19:09:19

terminal emacs here.