This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-09-25
Channels
- # alda (7)
- # aleph (10)
- # announcements (3)
- # babashka (103)
- # beginners (54)
- # calva (62)
- # clerk (2)
- # clj-yaml (27)
- # cljs-dev (1)
- # clojure (61)
- # clojure-europe (64)
- # clojure-nl (3)
- # clojure-norway (34)
- # clojure-sweden (4)
- # clojure-uk (4)
- # conjure (9)
- # cursive (1)
- # data-science (3)
- # fulcro (20)
- # gratitude (1)
- # hyperfiddle (54)
- # lsp (9)
- # malli (7)
- # meander (4)
- # membrane (17)
- # off-topic (23)
- # releases (3)
- # sci (1)
- # shadow-cljs (5)
- # sql (1)
- # tree-sitter (8)
- # vim (6)
Is ~/.emacs.d/workspace/.cache/
something related to lsp-mode
and/or clojure-lsp
? I noticed that when I navigate from my project to some library namespace, emacs opens ~/.emacs.d/workspace/.cache/some.library.ns.clj
. This is fine, but if I have multiple projects open with different versions of dependencies, then ~/.emacs.d/workspace/.cache/some.library.ns.clj
gets populated once and does not reflect the actual version wrt. the currently open project.
I guess this is related to lsp-clojure-workspace-cache-dir
FWIW with eglot I don't have am .emacs.d/workspace folder
Yeah, that's from lsp-mode and it's a known issue, we should append the lib version in the path to avoid conflicts, meanwhile you can just delete the file when it's outdated and go to definition again to create a updated one
Found a renaming bug in lsp with cljc files. Could be in kondo, but I'm going to paste it here first so I don't forget (EDIT: not a clj-kondo analysis issue)
(let [instance-expr 1
instance-expr instance-expr]
#?(:clj [instance-expr]
:cljs [instance-expr]))
Rename the second instance-expr
in the let to instance-expr*
and only the :clj
branch will pick up the changeclj-kondo data seems correct: I get id 2 for both local usages, but only one gets renamed
$ clj-kondo --lint - --config '{:analysis {:locals true} :output {:format :edn}}' <<< '(let [instance-expr 1 instance-expr instance-expr] #?(:clj [instance-expr] :cljs [instance-expr]))' | jet -T ':analysis (select-keys [:locals :local-usages])'
{:local-usages [{:col 37,
:end-col 50,
:end-row 1,
:filename "<stdin>",
:id 1,
:name instance-expr,
:name-col 37,
:name-end-col 50,
:name-end-row 1,
:name-row 1,
:row 1}
{:col 61,
:end-col 74,
:end-row 1,
:filename "<stdin>",
:id 2,
:name instance-expr,
:name-col 61,
:name-end-col 74,
:name-end-row 1,
:name-row 1,
:row 1}
{:col 83,
:end-col 96,
:end-row 1,
:filename "<stdin>",
:id 2,
:name instance-expr,
:name-col 83,
:name-end-col 96,
:name-end-row 1,
:name-row 1,
:row 1}],
:locals [{:col 7,
:end-col 20,
:end-row 1,
:filename "<stdin>",
:id 1,
:name instance-expr,
:row 1,
:scope-end-col 99,
:scope-end-row 1,
:str "instance-expr"}
{:col 23,
:end-col 36,
:end-row 1,
:filename "<stdin>",
:id 2,
:name instance-expr,
:row 1,
:scope-end-col 99,
:scope-end-row 1,
:str "instance-expr"}]}
I'll open a github issue if you want @UKFSJSM38