Fork me on GitHub
#clojure-europe
<
2021-02-02
>
thomas08:02:49

mogge and welcome @elegoff760

👍 3
slipset09:02:26

@dharrigan You’re involved with the clojure-lsp, right?

dharrigan10:02:17

very so slightly. I package it up for Arch Linux and last night I did a small PR to include

danielneal10:02:20

(I've just started using clojure-lsp, very impressed!)

dharrigan10:02:28

that is as far as my involvement goes (atm!)

slipset10:02:46

I started using it today, it solves my last emacs-clojure problems, I believe.

dharrigan10:02:19

I use it in (neo)vim with CoC and Conjure. It's winning combination (for me!)

otfrom10:02:05

@slipset (and any others) what do you feel that clojure-lsp gives you that CIDER doesn't? It does look like it replaces from clj-refactor things, but some of them are moving into CIDER anyway

otfrom10:02:25

(just wondering if it is worth switching over or adding to my CIDER confing)

slipset10:02:16

find-usages and rename-symbol

borkdude10:02:41

(find-definition for locally defined things)

slipset10:02:43

I’ve been firing up cursive for this

slipset10:02:30

So, yes, it replaces two things from clj-refactor that are currently b0rken for me.

borkdude10:02:59

Don't use my name in vain

borkdude10:02:37

(haha, kidding, of course)

slipset10:02:51

I didn’t I said b0rken, not borken.

borkdude10:02:43

Btw, the above find-definition for a local is one thing CIDER doesn't do. Since you cannot find these locations using runtime information in Clojure AFAIK. But clj-kondo exposes it and clojure-lsp uses it :)

slipset10:02:59

But thanks for posting that link yesterday, it is referred to from the clojure-lsp docs, but not “in your face”

borkdude10:02:31

Yeah, I think I had tried out lsp some years ago but it was relatively flakey back then. It seems a lot better now

slipset10:02:39

Oh, and the lenses

borkdude10:02:42

although I had to delete some elpa dir stuff to get it worked correctly

slipset10:02:50

the lenses rock!

borkdude10:02:02

what is the lens stuff?

slipset10:02:01

It shows how many references a symbol has.

slipset10:02:12

You have it in your gif as well.

slipset10:02:25

The “2868 references” thingy

borkdude10:02:58

Ah I had already enabled that (I think by copying some snippet), cool

slipset10:02:01

Haven’t seen that in Cursive.

borkdude10:02:18

This is useful for removing unused vars. Similar to carve, but more in your editor, cool!

slipset10:02:36

And the opposite, it gives you candidates for optimization.

slipset10:02:51

Making the id fn above slow, would have large impact.

slipset10:02:00

And it’s clickable!

slipset10:02:30

or at least it invites you to click on it.

borkdude10:02:53

lsp-find-references will give you all refs

borkdude10:02:08

and that list is clickable as in that it works

hkjels10:02:49

I haven’t tried lsp in Emacs in a while. Are you using lsp-mode or eglot?

slipset10:02:27

lsp-mode I believe

slipset10:02:04

Also, the bread-crumbs (which I initially wanted to turn off) show if there are linting errors, both in the namespace and the current fn.

dharrigan10:02:18

what's that screenshot showing @slipset, the :- and the (s/defn) - a library that allows you to define a return type? and argument types?

slipset10:02:31

plumatic.schema`

hkjels10:02:45

I’ll have to give it another go

borkdude10:02:10

Thanks for the kind sponsoring on Github @slipset

slipset10:02:45

Not much, but you’re becoming very important to my clojure well being.

otfrom10:02:31

sounds like it is worth adding to my config