Fork me on GitHub
#lsp
<
2022-10-31
>
borkdude11:10:34

Idea for lsp: show # references in lens-mode per function overload (to detect whether an overload is used at all)

💯 2
ericdallo11:10:55

Sounds cool, that's not the first time someone suggest different reference lens presentation, @U11EL3P9U suggested something similar but more focused on tests, maybe we could have a setting for those different kind of lens

Noah Bogart18:10:17

Any reason why I'm seeing 2022-10-31T18:47:55.154Z WARN [clojure-lsp.server:43] - received unexpected request clojure/cursorInfo/log?

Noah Bogart18:10:38

$ clojure-lsp --version
clojure-lsp 2022.10.05-16.39.51
clj-kondo 2022.10.05

ericdallo18:10:56

not really, also this command is used for debugging purposes usually

ericdallo18:10:30

anything on server logs?

Noah Bogart18:10:31

Yeah, I expose it in coc-clojure, and at some point it stopped working so I'm trying to figure out if it was something I did or something y'all did lol

ericdallo18:10:46

that's odd, I use it all the time during development

Noah Bogart18:10:10

clojure-lsp logs shortly after start up:

2022-10-31T18:53:03.664Z  INFO [clojure-lsp.feature.clojuredocs:23] - [Clojuredocs] Refreshing clojuredocs cache took 1115ms.
2022-10-31T18:53:08.446Z  INFO [clojure-lsp.handlers:379] - :code-lens 0ms
2022-10-31T18:53:08.459Z  INFO [clojure-lsp.handlers:385] - :resolve-code-lens 6ms
[repeated a bunch]
2022-10-31T18:53:08.541Z  INFO [clojure-lsp.handlers:385] - :resolve-code-lens 89ms
2022-10-31T18:53:14.006Z  WARN [clojure-lsp.server:43] - received unexpected request clojure/cursorInfo/log

Noah Bogart18:10:30

coc logs:

2022-10-31T14:53:02.551 INFO (pid:256201) [services] - LanguageClient Clojure Language Client state change: starting => running
2022-10-31T14:53:02.554 DEBUG (pid:256201) [sources] - created service source clojure
2022-10-31T14:53:02.563 INFO (pid:256201) [services] - service clojure started
2022-10-31T14:53:09.460 DEBUG (pid:256201) [core-documents] - buffer created 13 false file:///home/noah/work/muncher/%5BWilder%20Float%200%5D
2022-10-31T14:53:11.182 INFO (pid:256201) [attach] - receive notification: runCommand []
2022-10-31T14:53:11.198 DEBUG (pid:256201) [core-documents] - buffer created 15 false list:/commands
2022-10-31T14:53:13.966 DEBUG (pid:256201) [core-documents] - document detach 15 list:/commands
2022-10-31T14:53:13.967 DEBUG (pid:256201) [coc-clojure] - Executing 'fn' command lsp-clojure-cursor-info
2022-10-31T14:53:14.005 INFO (pid:256201) [extension:coc-clojure] - file:///home/noah/work/muncher/src/crossbeam/db.clj 22 9

Noah Bogart18:10:49

i'm logging out the uri, line, and character at the end there

ericdallo18:10:56

uh, I know why

ericdallo18:10:01

it's a notification, not a request

ericdallo18:10:23

we changed recently that I think, I didn't know it could cause issues to clients

ericdallo18:10:29

maybe coc is calling it as a request and not as a notification?

Noah Bogart18:10:50

i am calling return client.sendRequest("clojure/cursorInfo/log", { directly lol

Noah Bogart18:10:04

I'll check the docs for sending notifications. Thanks!

ericdallo18:10:28

👍 They are pretty similar, but client won't wait for a response basically

Noah Bogart19:10:12

figured it out, thank you

walterl23:10:14

Is there a way to configure the (very useful!) Create private function 'foo' action to output the args list on a new line?

walterl23:10:22

I.e.

(defn- foo
  [x y]
  )
rather than
(defn- foo [x y]
  )

ericdallo23:10:56

ATM no, but maybe a setting would work, seems a little bit too specific though

👍 1
snoe06:11:22

we should apply the formatter there. (not sure if cljfmt will do this, but we've been talking about including others).

ericdallo11:11:35

I'm not aware of any cljfmt setting for that, but makes sense to format