This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-01-19
Channels
- # announcements (19)
- # asami (9)
- # babashka (26)
- # beginners (87)
- # biff (23)
- # calva (6)
- # clerk (7)
- # clj-kondo (3)
- # cljsrn (3)
- # clojure (115)
- # clojure-belgium (1)
- # clojure-berlin (1)
- # clojure-europe (31)
- # clojure-gamedev (5)
- # clojure-nl (2)
- # clojure-norway (8)
- # clojure-uk (2)
- # clojurescript (43)
- # clr (23)
- # datalevin (1)
- # datomic (14)
- # dev-tooling (23)
- # fulcro (38)
- # graphql (1)
- # gratitude (1)
- # jobs (1)
- # lsp (30)
- # off-topic (7)
- # pathom (25)
- # portal (21)
- # quil (6)
- # releases (5)
- # remote-jobs (1)
- # shadow-cljs (34)
- # sql (5)
- # tools-deps (6)
- # xtdb (13)
Any idea why navigation won't work in this case from the bottom defn
usage to the custom defn
macro one? I looked at the clj-kondo analysis and this seems right
(ns foo
(:refer-clojure :exclude [defn])
(:require [clojure.core :as core]))
(core/defmacro defn [name & body]
`(core/defn ~name ~@body))
(|defn foo [])
could you be more specific where it's the cursor with |
that you are trying to find defintiion?
In metabase, when I run "find references" on the custom defn macro, I get a lot of clojure.core/defn references instead
hum, for some reason, the var-definition of your custom defn
seems wrong, you can confirm that calling lsp-clojure-cursor-info
with cursor on that defn
the :ns
especifically is wrong, not sure if it's a clojure-lsp or kondo bug, let me check
$ clojure -M:clj-kondo/dev --lint src/foo.clj --config '{:analysis true :output {:format :edn}}' | jet --query ':analysis :var-definitions'
[{:col 1,
:defined-by clojure.core/defmacro,
:end-col 29,
:end-row 6,
:filename "src/foo.clj",
:macro true,
:name defn,
:name-col 16,
:name-end-col 20,
:name-end-row 5,
:name-row 5,
:ns clojure.core,
:row 5,
:varargs-min-arity 2}]
There were some overrides applied to the stored analysis for clojure.core, but this was done regardless of the namespace. It should only be done for clojure.core/cljs.core https://github.com/clj-kondo/clj-kondo/blob/38bf429b4ffb5712bebd7fd63c1db34f1a600699/src/clj_kondo/impl/analysis.clj#L87 cc @UPWHQK562 :)
@UKFSJSM38 ready to be bumped
I made a dev script to launch clojure-lsp from my local dev folder with also my local version of clj-kondo:
#!/usr/bin/env bash
clj -Sdeps '{:deps {clj-kondo/clj-kondo {:local/root "/Users/borkdude/dev/clj-kondo"}
clojure-lsp/clojure-lsp {:local/root "/Users/borkdude/dev/clojure-lsp/cli"}
cider/cider-nrepl {:mvn/version "0.28.6"}}}' -M -m clojure-lsp.main
I called this script ~/bin/clojure-lsp-dev
and use it in my emacs settings as the server command
Including nREPL takes care of having an nREPL available to make changes to clj-kondo and clojure-lsp while it's running. The bb debug-cli
is nice, but I needed to re-generate it too oftenSince I don't code that much on clj-kondo, I usually run this:
alias update-clojure-lsp='bash <(curl -s ) --dir ~/dev/clojure-lsp/ --version nightly --static
which downloads the latest nightly if I'm not actively developing somethingHi guys! I’m using clojure-lsp with emacs and I have this error in /tmp/clojure-lsp.out
:
Error while looking up classpath info in /Users/.../Documents/labs/.... Error: Cannot run program "clojure" (in directory "/Users/.../Documents/labs/..."): error=2, No such file or directory
I don’t know why I get this error. I can run clojure -M:dev
in the project