clojure-ts-mode icon indicating copy to clipboard operation
clojure-ts-mode copied to clipboard

Implement missing ns-related functionality

Open bbatsov opened this issue 5 months ago • 2 comments

While looking at the clojure-project-dir functionality, I've noticed that we haven't yet ported any of the ns manipulation commands from clojure-mode (see https://github.com/clojure-emacs/clojure-mode/blob/master/clojure-mode.el#L2044)

Seems we're also missing something like clojure-find-def, although I'm not sure this was used much in practice.

I also remembered another reason why clojure-project-dir was in clojure-mode and not CIDER - it was needed by clojure-expected-ns.

bbatsov avatar Jul 04 '25 13:07 bbatsov

Looking at the clojure-mode code, I guess most of the functions could be ported as is, except probably clojure-sort-ns (where we could try to utilize Tree-sitter) and clojure-project-dir (I would use built-in project.el the same way we did recently for inf-clojure).

I see some of those functions use cache (clojure-cache-project-dir and clojure-cache-ns), should we also port it to clojure-ts-mode?

rrudakov avatar Jul 04 '25 16:07 rrudakov

Yeah, we should - CIDER makes heavy use of those.

bbatsov avatar Jul 04 '25 19:07 bbatsov