This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-11-02
Channels
- # announcements (11)
- # aws (2)
- # babashka (42)
- # beginners (26)
- # calva (17)
- # cider (1)
- # clara (2)
- # clj-kondo (44)
- # clojars (30)
- # clojure (43)
- # clojure-australia (6)
- # clojure-europe (29)
- # clojure-gamedev (4)
- # clojure-greece (1)
- # clojure-nl (4)
- # clojure-spec (4)
- # clojure-uk (6)
- # clojurescript (28)
- # cursive (16)
- # data-science (1)
- # datahike (4)
- # datomic (26)
- # emacs (6)
- # events (3)
- # fulcro (11)
- # graalvm (7)
- # holy-lambda (118)
- # java (9)
- # jobs (1)
- # leiningen (3)
- # lsp (21)
- # luminus (2)
- # malli (13)
- # membrane-term (1)
- # music (1)
- # nrepl (3)
- # off-topic (38)
- # pedestal (2)
- # polylith (39)
- # re-frame (33)
- # reagent (7)
- # releases (1)
- # remote-jobs (4)
- # rewrite-clj (28)
- # ring (21)
- # sql (2)
- # tools-deps (23)
- # vim (4)
- # xtdb (15)
is there a way to stop the clojure-lsp std-err buffer from being created? i tab into it by accident and then my emacs needs to be force quit :face_palm:
No, this is created automatically by lsp-mode for each server you start. Even so never saw this buffer cause any issues, I change to this buffer everytime I want to debug a error or something
i think it's because i've got a font with ligature support enabled
Released clojure-lsp https://github.com/clojure-lsp/clojure-lsp/releases/tag/2021.11.02-15.24.47 with more improvements and some new LSP features! • General ◦ Bump Graalvm from 21.2.0 to 21.3.0 improving binary performance/size ◦ Fix wrong parse of code when code contains namespaced maps like `#:foo{:bar 1}`. This issue was affecting a lot of features for example code actions. ◦ Bump datalevin from 0.5.26 to 0.5.27. ◦ Improve semantic tokens for dynamic vars, function definitions, namespaced and aliased keywords. ◦ Fix bug where `:source-paths` settings could be hot-reloaded with wrong-value. • Editor ◦ Deprecates setting `:show-docs-arity-on-same-line?` in favor of `:hover` `:arity-on-same-line?`. ◦ Add support to new LSP `LinkedEditingRange` feature. https://github.com/clojure-lsp/clojure-lsp/issues/341 ◦ Improve suggested `Add require ...` code actions, this should make clojure-lsp smarter when user wants to add a missing require. https://github.com/clojure-lsp/clojure-lsp/issues/614 ◦ Change `:notify-references-on-file-change` default from `false` to `true`, we had some performance improvements and I've been testing this for some time now and didn't see any new issues with that. This should improve a lot the UX when user change any code that is references on other files, updating the diagnostics for those files as well. ◦ Improve rename feature UX to output errors when it's not possible rename. ◦ Add support for `window/showDocument` LSP method, used on `create-test` command/code action after creating the test to show the test file. ◦ Add new `Unwind thread once` and `Unwind whole thread` code actions to undo a thread call. ◦ Improve code actions performance requesting async all actions. ◦ Add new LSP custom method `clojure/clojuredocs/raw` which takes a symbol and a namespace (both strings) and returns any Clojuredocs entry found, otherwise `null`. ◦ Fix missing keywords rename/references for destructured keywords. • CLI ◦ Show error/warning message when a classpath scan fail during analysis. Fixes https://github.com/clojure-lsp/clojure-lsp/issues/626 ◦ Add coloring to `diagnostics` output matching diagnostic severity. The highlights of this release are: • New code actions to unwind a thread call • Change `:notify-references-on-file-change` default value from false to true, which makes clojure-lsp notify other files when a change was made to a reference, Example: you change the function arity of the `foo` function from 1 to 2, then clojure-lsp will re-lint all usages/references of that function, making the diagnostics consistent with the whole project. • The huge improvement on the `Add missing require` code actions where clojure-lsp now try to infer some namespaces from alias like alias `f.bar` for ns `foo.bar`, please let me know if any corner case bugs on this one. • The new `LinkedEditingRange` feature which makes possible rename variables from the same buffer live, check the gif This release was supported by https://www.clojuriststogether.org/
notify-references-on-file-change
change is a huge QOL bump, thank you
yeah, it's been some time I want to enable it by default, but the feature was with some performance issues, now I think it's good enough to be on by default :)
I'm seeing this exception in the LSP log (in Calva/VS Code) with that latest version:
Nov 02, 2021 2:22:50 PM org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer fireError
SEVERE: Unable to invoke no-args constructor for class org.eclipse.lsp4j.SetTraceParams. Registering an InstanceCreator with Gson for this type may fix this problem.
java.lang.RuntimeException: Unable to invoke no-args constructor for class org.eclipse.lsp4j.SetTraceParams. Registering an InstanceCreator with Gson for this type may fix this problem.
at com.google.gson.internal.ConstructorConstructor$14.construct(ConstructorConstructor.java:228)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:212)
at com.google.gson.Gson.fromJson(Gson.java:963)
at org.eclipse.lsp4j.jsonrpc.json.adapters.MessageTypeAdapter.fromJson(MessageTypeAdapter.java:329)
at org.eclipse.lsp4j.jsonrpc.json.adapters.MessageTypeAdapter.parseParams(MessageTypeAdapter.java:249)
at org.eclipse.lsp4j.jsonrpc.json.adapters.MessageTypeAdapter.read(MessageTypeAdapter.java:119)
at org.eclipse.lsp4j.jsonrpc.json.adapters.MessageTypeAdapter.read(MessageTypeAdapter.java:55)
at com.google.gson.Gson.fromJson(Gson.java:963)
at org.eclipse.lsp4j.jsonrpc.json.MessageJsonHandler.parseMessage(MessageJsonHandler.java:119)
at org.eclipse.lsp4j.jsonrpc.json.MessageJsonHandler.parseMessage(MessageJsonHandler.java:114)
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:193)
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.lang.Thread.run(Thread.java:829)
at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:596)
at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Method.java:566)
at com.google.gson.internal.UnsafeAllocator$1.newInstance(UnsafeAllocator.java:50)
at com.google.gson.internal.ConstructorConstructor$14.construct(ConstructorConstructor.java:225)
... 19 more
Caused by: java.lang.IllegalArgumentException: Class org.eclipse.lsp4j.SetTraceParams is instantiated reflectively but was never registered. Register the class by using org.graalvm.nativeimage.hosted.RuntimeReflection
at com.oracle.svm.core.graal.snippets.SubstrateAllocationSnippets.hubErrorStub(SubstrateAllocationSnippets.java:258)
at sun.misc.Unsafe.allocateInstance(Unsafe.java:840)
... 22 more
and I'm not getting proper semantic token coloring.This could be a reflection issue. @UKFSJSM38
According to lsp4j, it is related with
A notification that should be used by the client to modify the trace setting of the server.
It doesn't seem to block any clojure-lsp feature and it's not a new bug it seems, I'll include the fix on the next releasethanks for the report @U04V70XH6
Hmm, I wound back to 2021.10.20-16.49.47 and restarted and I'm still not getting proper semantic token coloring (strings and comments are white in the Dark+ theme in VS Code where they used to be brown and green respectively, as I recall from last week).
OK, the trace exception above has nothing to do with the semantic token coloring. Seems to be an extension conflict in VS Code. Will debug and bring that up elsewhere...
Interesting. I don't get the trace exception unless I have Clover enabled. With Clover disabled, it all works -- including coloring.
that's odd, AFAICS this is a new LSP notification that happens when client change the trace settings: https://microsoft.github.io/language-server-protocol/specification#setTrace
and probably started happen with the semantic tokens calva update that bumped the vscode-language-client
package which included this new trace feature
Interesting. OK. But Clover does seem to interfere with coloring/token stuff somehow.
(it's related to the Clojure grammar file -- I have a workaround: everything's fine now 🙂 )