Before I switched to Cider, I was using CounterClockWise. To this day, I still much prefer its UX.
The way what you eval doesn’t eval in the REPL buffer. How errors show up as a new buffer. Everything popping up in a new buffer really annoys me to be honest. Why can’t doc show up in the REPL buffer, or macroexpand, etc.
I also wish it was eval sexpr at point instead of eval last sexpr. And that it could auto complete function arguments.
I actually much prefer inf-clojure in that way, but it lacks more advanced features unfortunatly.
So, while I got used to Cider, I wish there was something simpler, more straightforward, which still supported the advanced features of Cider.
First of all I do not know CounterClockWise and it’s workflows.
Not sure if I understand you right but popping up error messages in Cider could be controlled by the variable cider-show-error-buffer.
(setq cider-show-error-buffer 'only-in-repl)
After setting this variable to only-in-repl it should not pop up error messages. It will only be shown in the REPL.
If you do not want to pop up ein documentation window for showing the doc-buffer for a given function, you could add a function which looks something like (not tested):
For macroexpand I am sure you can write a similar function. You can use e.g. cider-eval-region in combination with expand-region for evaluating.
What features do you exactly miss about inf-clojure?
The nice thing in Emacs is that you can extend it exactly to your workflow. I hope this helps a bit for you to configure your ‘perfect’ workflow within Emacs/Cider/inf-clojure!
The result of cider-eval-last-sexp (C-x C-e) displays in the buffer you’re working in, not a new temporary buffer.
cider-eval-defun-at-point (C-c C-c) evaluates the top-level sexp at point, is that what you mean?
Could you be more specific about what you want? CIDER integrates with company-mode.
So you want something simpler…that also has advanced features. The problem is that “simple” for you might be complex or annoying for me. Or the basic features I want are, to you, “advanced”. CIDER has to support many different workflows.
I wonder if some digging in the documentation could get you to your ideal workflow. I certainly don’t know all the customizations available.
There was already some commands that would insert the current-sexp/defun/last-sexp/etc into the repl, but by default it would throw your cursor into the repl and not eval it. So This first one automatically causes it to insert the form into the repl and then eval it for you. Check out the map which is defined at C-c C-j. you’ll find d, e, r, and one other for defun expression and region.
Don’t switch to the repl after running one of these insert commands. I, like you, like eval-ing code and seeing the repl contain a history of what i’ve done, similar to the way cursive works. When you use this it won’t plop your point back in the repl. So the combination of these two is to print a form in the repl and then eval that form there without dragging your cursor from where you currently are.
Often people use (comment (form) (form) (form)) for interacting with the repl. I modified what “top level defun” is to be aware that if things are in a comment form find the form underneath the comment form and use that. Previously if you evaled this form you would just get nil back from the comment form. Now you will be able to get the top level form inside the comment form. Combined with the previous two options of inserting and evaling in teh repl it is quite nice. This was a feature request from Tim Baldridge and has really been nice.
I was hoping to see some more information in the docs but I can’t find it now (https://cider.readthedocs.io/en/latest/). I’ll update that when I have a chance.
Thanks everyone for your tips. Turns out Cider is highly customizable, and after using it some more and tweaking things with people’s suggestions, it works pretty much how I want.