This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-09-16
Channels
- # announcements (19)
- # babashka (13)
- # beginners (7)
- # calva (8)
- # cider (25)
- # clj-kondo (12)
- # cljsrn (7)
- # clojure (60)
- # clojure-australia (5)
- # clojure-europe (59)
- # clojure-france (14)
- # clojure-gamedev (2)
- # clojure-nl (1)
- # clojure-uk (7)
- # clojurescript (43)
- # community-development (8)
- # core-async (2)
- # cursive (15)
- # datomic (75)
- # deps-new (31)
- # depstar (1)
- # fulcro (6)
- # graalvm (53)
- # holy-lambda (1)
- # juxt (3)
- # jvm (13)
- # kaocha (8)
- # lsp (109)
- # malli (14)
- # off-topic (62)
- # pathom (11)
- # pedestal (12)
- # polylith (12)
- # releases (5)
- # sci (5)
- # shadow-cljs (15)
- # sql (16)
- # tools-deps (27)
- # vim (1)
- # xtdb (14)
gave another try to clojure-lsp today after a long hiatus, and wow, I am impressed, hats off to all the people involved, it's really a smooth ride now
I disabled most of the UI stuff (headers & other noise), but I am sure I missed some cool stuff
@mpenet I've done the same, I don't like the noise, but I did enable lens-mode which is quite convenient in that it shows the amount of references. I'll look up my config.
I haven't noticed that. This is my config: https://github.com/borkdude/prelude/blob/master/personal/init.el#L356-L409 Note, I don't optimize my emacs config for share-ability ;)
I run my own version of clj-kondo because I develop that project, so I disabled diagnostics in lsp which bundles clj-kondo
https://emacs-lsp.github.io/lsp-mode/page/settings/completion/#lsp-completion-provider capf is already the default fyi
When CIDER 1.2 is released, the built-in xref-find-definitions will be able to use both cider and lsp as backends, similarly to your find-definition
I’m running into problems where clojure-lsp doesn’t start up in my projects any more after upgrading to the latest version. anybody has similar problesm?
2021-09-16T09:57:38.614Z Totaranui.local INFO [clojure-lsp.kondo:137] - Analyzing 3/8 batch paths with clj-kondo...
2021-09-16T09:57:56.273Z Totaranui.local ERROR [clojure-lsp.server:?] -
com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine PosixJavaThreads.java: 192
com.oracle.svm.core.thread.JavaThreads.threadStartRoutine JavaThreads.java: 567
java.lang.Thread.run Thread.java: 829
java.util.concurrent.ThreadPoolExecutor$Worker.run ThreadPoolExecutor.java: 628
java.util.concurrent.ThreadPoolExecutor.runWorker ThreadPoolExecutor.java: 1128
java.util.concurrent.FutureTask.run FutureTask.java: 264
java.util.concurrent.Executors$RunnableAdapter.call Executors.java: 515
org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run ConcurrentMessageProcessor.java: 113
org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen StreamMessageProducer.java: 94
org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage StreamMessageProducer.java: 194
org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume RemoteEndpoint.java: 190
org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleRequest RemoteEndpoint.java: 261
org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.request GenericEndpoint.java: 120
org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0 GenericEndpoint.java: 65
...
clojure_lsp.server.proxy$clojure_lsp.ClojureExtensions$ExtraMethods$LanguageServer$4129860f.initialize
clojure-lsp.server/fn/fn server.clj: 301
clojure-lsp.handlers/initialize handlers.clj: 49
clojure-lsp.crawler/initialize-project crawler.clj: 195
clojure-lsp.crawler/analyze-classpath! crawler.clj: 146
clojure-lsp.crawler/analyze-external-classpath! crawler.clj: 101
clojure-lsp.kondo/run-kondo-on-paths-batch! kondo.clj: 139
clojure.core/reduce core.clj: 6826
clojure.core.protocols/fn/G protocols.clj: 13
clojure.core.protocols/fn protocols.clj: 75
clojure.core.protocols/seq-reduce protocols.clj: 27
clojure.core.protocols/fn/G protocols.clj: 19
clojure.core.protocols/fn protocols.clj: 169
clojure.core/next core.clj: 64
...
clojure.core/map-indexed/mapi/fn core.clj: 7312
clojure-lsp.kondo/run-kondo-on-paths-batch!/fn kondo.clj: 138
clojure-lsp.kondo/run-kondo-on-paths! kondo.clj: 120
clj-kondo.core/run! core.clj: 189
clojure.core/sort-by core.clj: 3107 (repeats 2 times)
clojure.core/sort core.clj: 3101
clojure.core/to-array core.clj: 346
...
clj-kondo.impl.core/filter-findings/iter/fn core.clj: 491
clj-kondo.impl.core/filter-findings/iter/fn/fn core.clj: 504
clojure.core/comp/fn core.clj: 2574
clojure.core/some core.clj: 2705
clj-kondo.impl.core/filter-findings/iter/fn/fn/fn core.clj: 505
clojure.core/re-find core.clj: 4887
clojure.core/re-matcher core.clj: 4845
java.util.regex.Pattern.matcher Pattern.java: 1133
java.util.regex.Matcher.<init> Matcher.java: 253
java.util.regex.Matcher.reset Matcher.java: 416
java.util.regex.Matcher.getTextLength Matcher.java: 1770
java.lang.NullPointerException:
2021-09-16T09:57:56.278Z Totaranui.local DEBUG [clojure-lsp.server:?] - :initialize 72979ms
Are you using this? https://github.com/clj-kondo/clj-kondo/blob/0df4186759ff2e8fbf50e0161db211dd644b8205/src/clj_kondo/impl/core.clj#L489-L490
:output {:exclude-files ["unrepl-blob"
"scratch/templates/styleguide"
"public/js"
"compiled"]}
can you reproduce the issue when using clj-kondo on the command line and linting your project?
and you would likely see this when linting your project (and removing this config temporarily)
yep, problem seems to be gone. sorry, no idea what I did here to either break or then fix it
That's odd, if you face the issue again let us know @U45J3R52L, thanks for the debug help @U04V15CAJ
Does clojure-lsp support something like moving a function to a new namespace?
Not yet, but I already thought about a code action to do that, please open an issue, it sounds a good idea indeed
I am used to https://github.com/wolray/symbol-overlay for highlighting, it's similar to lsp-symbol-highlighting but it also allows to make some highlight persistent and have multiple of them on a buffer (with different color per highlight), it's quite handy, is there anything similar possible with lsp? I know about lsp-symbol-highlighting but it does just the first part, "idle" highlighting
Probably @ericdallo knows more about this. Perhaps someone in the emacs lsp-mode
channel on Discord knows as well.
I am not in a hurry 🙂 . lsp-symbol-highlighing already uses overlays (good!), so that's probably somewhat easy to add I supose
@mpenet unfortunately the LSP protocol for the document highlight doesn't support that kind of feature :/ and adding a custom wrapper around that would need to make bug changes on both lsp-mode, clojure-lsp and other editors, although there is lsp-iedit-highlights that I use all the time which makes the highlights persisted, it will show only one color but it's more than the default behavior
just use the persistence feature of symbol-overlay and let lsp do the idle highlighting (it's a bit smarter than symbol overlay, since it can "resolve" vars)
That probably could be improved on lsp-mode to integrate with the document-highlight as we did for iedit, you may want to open an issue on lsp-mode sharing this idea
yeah, just not enabling symbol-overlay-mode and using symbol-overlay-put & co separately works like a charm
Does anyone know a way to see a list of the references displayed by lsp-lens? I'm hoping there is something like the lsp-ui that lists fns in an ns but listing the references and a quick way to jump to them
otherwise there is lsp-treemacs-symbols
but it show all vars and not references of the namespace
I saw in your dotfiles it looked like you load it from a local version, is that correct?
So @ericdallo I added the (treemacs +lsp)
and things start up cleanly but not treemacs... When I add this
(use-package! lsp-treemacs
:config
(setq lsp-treemacs-error-list-current-project-only t))
in my config.el I get an error that the treemacs file/dir doesn't exist. Any tips?Last question today, are most people running lsp-clojure along side cider? I am currently doing that for repl support but wondering if I should be doing something else.
And thanks @ericdallo, lsp-treemacs is working and awesome!
check this, it should help with some questions and doom conflicts: https://emacs-lsp.github.io/lsp-mode/tutorials/clojure-guide/