Clojure documentation in Emacs

Can I view the documentation for Clojure functions in Emacs? Namely, can I configure Emacs to search for Clojure functions under the cursor?

I use clojure-mode and SLIME. Oddly enough, I can't even use apropos or dir in SLIME repl, although they are automatically loaded by lein repl .

+6
source share
3 answers

Try the slime-describe-symbol function, which is usually bound to Cc Cd d .

Place a dot somewhere next to the function name and press Cc , then Cd , and then d .

There's also a slime-describe-function tied to Cc Cd f , but I rarely use it since it is less general than the aforementioned character search function.

To view all documentation related features, press Cc Cd Ch . These bindings are not Clojure; they are instead defined by SLIME and will work, if not better, for other Lisp dialects.

+5
source

I find the combination of slime-apropos and eldoc minor mode (make sure you have swank-clojure 1.4.0 as it fixes both of them) is better than the slime-describe-symbol/function commands mentioned above.

+3
source

From SLIME REPL you can run (use 'clojure.repl). This will allow you to do functions like apropos and doc.

+2
source

Source: https://habr.com/ru/post/904859/


All Articles