Hi. I am running smartparens, lsp-mode, and cider. I use the command sp-indent-defun to auto indent code. This works fine while cider is not jacked in. After cider-jack-in-cljs the command applys different indentation rules. It seams cider takes over the indentation. How can I disable this?
I suggest you to learn how to use the built-in profiler. It's not that difficult. Then you won't ever have to even ask questions like this - you'd be able to figure out exactly what's driving what.
Run profiler-start, then sp-indent, then stop the profiler - analyze the call chain. Optionally, upon finding the functions that's getting called, you may want to use edebug to go through them.
Learning these two things will greatly enhance your Emacs skills.
Guessing what's exactly driving what on a specific machine, specific configuration, etc., is sometimes quite difficult - some hooks may get called, some functions may have been advised, etc.
In your specific scenario, I'm not even sure, you may want to check the value of cider-dynamic-indentation
Thank you @ag. Setting cider-dynamic-indentation to nil solved my issue.
I tried the profiler too. After profiler-stop how do I get to the call chain?
Once you stop it, there would be a buffer, or maybe even two - for CPU and for MEM. You just go through and explore it.
Can not find these buffers. I suppose configuration of the profiler is required
profiler-report 😄
Ah, yes. I forgot, sorry. Doom adds a simple toggle-profiler command, it just requires you to toggle it on and off and it does the rest
(defvar doom--profiler nil)
(defun doom/toggle-profiler ()
"Toggle the Emacs profiler. Run it again to see the profiling report."
(interactive)
(if (not doom--profiler)
(profiler-start 'cpu+mem)
(profiler-report)
(profiler-stop))
(setq doom--profiler (not doom--profiler)))