I have a mixed Clojure/Rust project. My Clojure code is in clj, which means deps.edn is found at clj/deps.edn relative to repo root, and my top-level application namespace is at clj/src/limabean.clj.
To make namespace inference work I had to tweak just one thing in fact, adding src/ to the clojure-ts-directory-prefixes, like this:
(use-package clojure-ts-mode
:custom
(clojure-ts-directory-prefixes '("^\\(?:[^/]+/\\)*clj[csxd]*/" "src/")))
My earlier approach of using locate-dominating-file to define the Clojure project root as where the deps.edn file lived turned out to break Eglot, which had a different idea of the project root. It turns out that these prefixes are all that was required to fix namespace inference.
Anyway, thanks for clojure-ts-mode, and hoping this helps someone.
I have a mixed Clojure/Rust project. My Clojure code is in
clj, which meansdeps.ednis found atclj/deps.ednrelative to repo root, and my top-level application namespace is atclj/src/limabean.clj.To make namespace inference work I had to tweak just one thing in fact, adding
src/to theclojure-ts-directory-prefixes, like this:My earlier approach of using
locate-dominating-fileto define the Clojure project root as where thedeps.ednfile lived turned out to break Eglot, which had a different idea of the project root. It turns out that these prefixes are all that was required to fix namespace inference.Anyway, thanks for
clojure-ts-mode, and hoping this helps someone.