lsp

jgdavey 2026-02-24T14:26:13.943579Z

Hey all, I recently upgraded both emacs lsp-mode and clojure-lsp-native, and I'm now receiving this message when opening edn files (other clojure files seem fine): > LSP There are no language servers supporting current mode edn-mode' registered with lsp-mode'. This is new behavior that I didn't see before upgrading. Any tips on where I should look to remedy this?

bozhidar 2026-03-10T18:51:46.422449Z

> oh I didn't know there is a edn-mode now, is this a new major mode? maybe @bozhidar know? I know, I know. 😄 It was requested a while back, and I finally got to doing it recently. Sorry for the late response!

ericdallo 2026-02-24T14:32:30.719159Z

oh I didn't know there is a edn-mode now, is this a new major mode? maybe @bozhidar know?

lassemaatta 2026-02-24T14:32:42.275969Z

yeah, it was recently added I think

ericdallo 2026-02-24T14:33:07.164679Z

Ok, I will add to lsp-mode, one sec

ericdallo 2026-02-24T14:35:11.265849Z

https://github.com/emacs-lsp/lsp-mode/commit/3e55ca80712d66f2fc38bad514b5e2521751433d, just make sure you update to latest lsp-mode @jgdavey when available in melpa in hour or so

🙇 2
🚀 1
jgdavey 2026-02-24T14:35:28.269759Z

Oh, awesome. Thanks!

sammy 2026-02-24T18:22:35.787349Z

(cross-posted from the zulip) does anyone have experience writing a custom clojure lsp linter? I'm trying to follow the documentation here: https://clojure-lsp.io/settings/#custom-linters and getting stuck. I created the following .lsp/config.edn:

{ :classpath-config-paths ["typeytypetypetype/examples"]
 :linters {:custom {typeytypetypetype.examples/example-linter {:level :info}}}}
as well as the following example linter file:
result of: cat clojure-lsp.exports/linters/typeytypetypetype/examples.clj
(ns typeytypetypetype.examples)


(defn example-linter [{:keys [db uris params reg-diagnostic!]}]
  (reg-diagnostic! {:uri (first uris)
                    :level (:level params)
                    :code "my-org/missing-unit-test"
                    :message "Logic function missing unit test"
                    :source "my-org/codestyle"
                    :range {:row 1 :col 2 :end-row 3 :end-col 4}}))
I tried running
clojure-lsp diagnostics --verbose
but do not see any info printed, and it's unclear to me whether it's picking up my changes, or running anything related to my example linter. I'm probably missing something obvious, but I've been fighting with it for a few hours, and I really struggled to understand the docs

ericdallo 2026-02-24T18:23:25.584619Z

Hey let me check!

ericdallo 2026-02-24T18:26:11.326019Z

@sam.t.straus I think the issue here is that the example.clj is not in the classpath of your project (I believe we can improve this explanation in the docs), but if you lein classpath or clj -Spath (if using deps.edn), you should see that file

ericdallo 2026-02-24T18:26:25.609809Z

usually, in projects people add that to the resources folder which is included in the classpath

sammy 2026-02-24T18:27:10.828829Z

does this go in the project root deps.edn, or inside of .lsp/config.edn?

ericdallo 2026-02-24T18:28:05.631939Z

the example.clj should go in something like:

resources/clojure-lsp.exports/linters/typeytypetypetype/examples.clj
and in your deps.edn you should have something similar to:
:paths ["src" "resources"]

sammy 2026-02-24T18:28:30.717619Z

oh, I see -- let me try that

ericdallo 2026-02-24T18:28:34.392119Z

the point is, the clojure-lsp.exports should be in an folder that is considered a classpath

sammy 2026-02-24T18:34:25.754059Z

[INFO] :maintain-dep-graph 0ms
[ 99%] Project analyzed            Finding diagnostics...
resources/clojure-lsp.exports/linters/typeytypetypetype/examples.clj:4:7: info: [clojure-lsp/unused-public-var] Unused public var 'typeytypetypetype.examples/example-linter'
resources/clojure-lsp.exports/linters/typeytypetypetype/examples.clj:4:31: warning: [unused-binding] unused binding db
src/typeytypetypetype/run_web_server.clj:2:51: warning: [unused-referred-var] #'compojure.core/POST is referred but never used
I still don't see the custom linter error (
"Logic function missing unit test"
) in the output, although interestingly the examples.clj file is now getting linted when I call clojure-lsp diagnostics --verbose is there any way to verify whether example-linter is registered/ever getting called?

ericdallo 2026-02-24T18:39:57.315229Z

you can ignore that file linters or add #_{:clojure-lsp/ignore [:clojure-lsp/unused-public-var]} and append _ to db. Hum, there should be some of https://github.com/clojure-lsp/clojure-lsp/blob/b16dda017000563a7de5ffc3184606c74ab6d031/lib/src/clojure_lsp/feature/diagnostics/custom.clj#L99-L124

sammy 2026-02-24T18:50:55.885319Z

managed to get this working after fixing the classpath issue, and then uninstalling and re-installing clojure-lsp. i think what confused me was that i assumed that everything in the lsp setup was fully contained in the .lsp folder, so I assumed that classpath in the docs was a reference to the :classpath-config-paths config.edn option thanks for your help! 🙂

ericdallo 2026-02-24T18:59:24.458779Z

hum maybe you had a old clojure-lsp version. Glad you have it working!