clojure-nl

Companies working with Clojure in The Netherlands: https://docs.google.com/spreadsheets/d/1NzOqY1v-OReB1IquUgHuT3Kh8K8jhPdlwBM6ds7id6Y/edit?usp=sharing
Ruben.Hamers 2021-02-02T08:05:37.012900Z

good morning šŸ™‚

gklijs 2021-02-02T08:06:43.013800Z

Morning, did Clojure just before sleeping, and just after waking up. What more can I want? šŸ˜€ Now normal shit again..

šŸ˜‚ 2
thomas 2021-02-02T08:31:09.014Z

mogge

Mno 2021-02-02T08:51:41.014400Z

Mornin!

kwrooijen 2021-02-02T10:00:34.014700Z

šŸ‘‹

borkdude 2021-02-02T10:14:16.015100Z

https://twitter.com/borkdude/status/1356545209157488640 ^ clj-kondo analysis used from clojure-lsp to find things, in emacs

kwrooijen 2021-02-02T10:15:18.015700Z

šŸ˜®

kwrooijen 2021-02-02T10:15:43.016100Z

Oh cool, you can use cider + lsp together? (from the tutorial linked)

kwrooijen 2021-02-02T10:16:10.016400Z

I'll take a look at this later tonight

kwrooijen 2021-02-02T10:16:13.016600Z

Thanks!

borkdude 2021-02-02T10:18:33.016800Z

yes

borkdude 2021-02-02T10:18:36.017Z

it's awesome

borkdude 2021-02-02T10:18:52.017400Z

we should maybe do a meetup about this, but I'm only using it for one day.

Mno 2021-02-02T10:19:09.017900Z

Iā€™ve been meaning to try it as well

borkdude 2021-02-02T10:19:11.018100Z

so if anyone else has been using it, feel free to do a talk about it :P

2021-02-02T10:41:24.019100Z

Iā€™ve been using it for few months but it feels so straight forward that I donā€™t even know what can the talk be about šŸ˜„

kwrooijen 2021-02-02T11:42:35.019300Z

I think the idea is more to just "show it off"

kwrooijen 2021-02-02T11:42:53.019700Z

Because I'm sure many people don't know it even exists

gklijs 2021-02-02T11:51:25.021900Z

I for one wouldn't know how to begin using. But I'm stuck on just leiningen from command line and IntelliJ.. I tried to use Emacs, but that was ages ago.

borkdude 2021-02-02T11:52:13.022300Z

This is not emacs specific btw. The same LSP server is used in Calva/VSCode now

borkdude 2021-02-02T11:52:21.022600Z

and you can also use it in vim

borkdude 2021-02-02T11:52:23.022800Z

etc

borkdude 2021-02-02T11:52:28.023Z

any editor which supports LSP

Mno 2021-02-02T11:54:06.023300Z

Thatā€™s the beauty of LSP, which is amazing in itā€™s own right

mpenet 2021-02-02T12:39:10.024600Z

I don't know if I was unlucky but last time I tried (right after the recent clj-kondo release) it was quite disapointing, like not able to do autocomplete on core.async fns (:require [clojure.core.async :as async]) and async/c would suggest nothing) and so on

mpenet 2021-02-02T12:41:04.025700Z

for navigation I still prefer git-grep/ripgrep via consult+embark on emacs, but that's just me maybe, old habits die hard

mpenet 2021-02-02T12:42:40.026100Z

I guess it will improve in time

borkdude 2021-02-02T12:46:01.026900Z

@mpenet the clojure-lsp project uses static analysis and maybe those vars could not be statically recognized

borkdude 2021-02-02T12:46:45.027800Z

oh chan should be recognized, it's just a defn

mpenet 2021-02-02T12:46:48.028Z

no clue but that's quite a limitation if it's not a bug

borkdude 2021-02-02T12:46:57.028300Z

might be a bug then

mpenet 2021-02-02T12:48:16.028800Z

could you try if you have the time ? (my lsp conf is gone)

mpenet 2021-02-02T12:48:52.029600Z

I was hoping to use lsp just for autocomplete when I am not runnig a repl for hit&runs modifications

borkdude 2021-02-02T12:49:13.029800Z

let's see

mpenet 2021-02-02T12:59:10.032400Z

I suspect it's also not able to pick up some of the stuff that's generated, like default spec generators aliased from test.check and other things like that.

mpenet 2021-02-02T12:59:52.033Z

but for common cases it's probably ok

borkdude 2021-02-02T13:01:13.033300Z

@mpenet

mpenet 2021-02-02T13:01:59.033900Z

yeah I guess I was not lucky with that build

mpenet 2021-02-02T13:02:15.034500Z

I remember reading clj-kondo analysis was partially broken early on

borkdude 2021-02-02T13:02:21.034900Z

This guide was helpful in setting it up: https://emacs-lsp.github.io/lsp-mode/tutorials/clojure-guide/ Also be sure to re-install lsp mode in emacs and delete your previous things from elpa, this got me

erwinrooijakkers 2021-02-04T13:30:04.047100Z

erwinrooijakkers 2021-02-04T13:30:09.047500Z

LSP :: Restarting LSP in buffer db.clj
LSP :: Connected to [clojure-lsp:59528/starting].
LSP :: clojure-lsp has exited (exited abnormally with code 1)

erwinrooijakkers 2021-02-04T13:30:33.047700Z

did you add the whole basic configuration?

borkdude 2021-02-04T13:31:36.047900Z

check the *clojure-lsp* buffers, your path may be wrong

borkdude 2021-02-04T13:31:53.048200Z

else ask in the #lsp channel

erwinrooijakkers 2021-02-04T13:31:57.048400Z

ah

erwinrooijakkers 2021-02-04T13:31:59.048600Z

thanks

erwinrooijakkers 2021-02-04T13:32:37.048800Z

Error: Invalid or corrupt jarfile /Users/erooijak/.emacs.d/.cache/lsp/clojure/clojure-lsp
Error: Invalid or corrupt jarfile /Users/erooijak/.emacs.d/.cache/lsp/clojure/clojure-lsp

erwinrooijakkers 2021-02-04T13:32:38.049Z

duidelijk

erwinrooijakkers 2021-02-04T13:32:49.049200Z

you also recompiled emacs.d right?

borkdude 2021-02-04T13:35:52.049400Z

Please ask in #lsp

borkdude 2021-02-04T13:36:05.049600Z

Don't have much time right now

šŸ‘ 1
erwinrooijakkers 2021-02-04T13:36:30.049800Z

Apparently thereā€™s also lsp layer in spacemacs, okay thank you for the suggestions!

mpenet 2021-02-02T13:02:22.035100Z

I mean the clj-lsp impl

mpenet 2021-02-02T13:02:44.035300Z

that's the guide I followed

borkdude 2021-02-02T13:03:09.036100Z

I am now using the native build on macOS, no JVM anymore for the server

borkdude 2021-02-02T13:03:48.036800Z

anyway, it takes time to set this up, it also took me a long time to try it again after having tried probably more than a year ago

borkdude 2021-02-02T13:03:56.037Z

so I understand the hesitation

mpenet 2021-02-02T13:04:45.037300Z

ā€¢ I think I might have hit: Fix clj-kondo batch analysis when merging batchs - Fix #284

mpenet 2021-02-02T13:05:05.037500Z

with my luck

mpenet 2021-02-02T13:06:43.038200Z

@borkdude it's quite easy to setup, the docs are good

borkdude 2021-02-02T13:07:18.038600Z

I also added this to my config: lsp-enable-indentation nil as this was slow for me on emacs 26

borkdude 2021-02-02T13:07:24.038900Z

and I'm using clojure-mode to indent anyway

mpenet 2021-02-02T13:07:45.039300Z

yeah, last time I tried I disabled pretty much everything: lenses, formating, etc

borkdude 2021-02-02T13:07:54.039600Z

lenses are cool though

mpenet 2021-02-02T13:07:57.039800Z

I just want "offline" autocomplete

mpenet 2021-02-02T13:08:12.040100Z

lenses: it's just noise for me

borkdude 2021-02-02T13:08:46.040700Z

@mpenet if you just want auto-complete: https://github.com/didibus/anakondo. Also based on kondo's output.

mpenet 2021-02-02T13:09:10.041100Z

oh nice

mpenet 2021-02-02T13:09:22.041400Z

I remember seeing it, not sure why I didn't try

borkdude 2021-02-02T13:10:36.042400Z

it might be less automatic than clojure-lsp since clj-kondo doesn't scan anything on its own so the user is responsible to invoke their build tool to provide a classpath, while clojure-lsp figures this stuff out for you

mpenet 2021-02-02T13:10:45.042600Z

ah

borkdude 2021-02-02T13:11:07.042900Z

but maybe @didibus can tell you more (not in this channel)

mpenet 2021-02-02T13:11:28.043300Z

> itā€™ll only auto-complete within the buffer, it wonā€™t be able to show candidates from the required dependencies

mpenet 2021-02-02T13:11:31.043500Z

šŸ˜ž

borkdude 2021-02-02T13:11:55.043700Z

huh, that is a bit weird

borkdude 2021-02-02T13:12:00.043900Z

since this isn't hard to support

mpenet 2021-02-02T13:12:25.044500Z

it's already supported out of the box even on emacs

borkdude 2021-02-02T13:12:26.044600Z

@mpenet I don't think that's true, given the screenshot in the README

borkdude 2021-02-02T13:13:02.045100Z

"If it canā€™t find either, itā€™ll only auto-complete within the buffer, it wonā€™t be able to show candidates from the required dependencies." I think the "If it can't find either" part is important.

mpenet 2021-02-02T13:13:03.045200Z

> It supports the notion of projects, using projectile or clojure-mode and Clojureā€™s tools.deps. This means itā€™ll pick up the bufferā€™s current project root using projectile or clojure-mode, and it will use Clojureā€™s tools.deps to get the projectā€™s classpath. If it canā€™t find either, itā€™ll only auto-complete within the buffer, it wonā€™t be able to show candidates from the required dependencies.

mpenet 2021-02-02T13:13:07.045400Z

taken out of context šŸ™‚

mpenet 2021-02-02T13:13:14.045600Z

yes