Fork me on GitHub
#cider
<
2020-01-24
>
Bardia Pourvakil04:01:26

Every time I get an error in the REPL, this happens and I can’t find a fix

Bardia Pourvakil04:01:32

It keeps indenting and I can’t get it to go back to normal

vemv16:01:27

did you try M-x cider-clear-...?

drewverlee23:01:07

i have never seen that before

dominicm18:01:48

I triggered this on a colleagues computer the other day also!

dominicm18:01:03

I'm a vimmer, so I pressed something unconventional

Bardia Pourvakil04:01:59

Anyone have any idea why this might be happening and how I could go about fixing it ?

FiVo15:01:21

@bardiapourvakil I had the a similar issue sometime ago. Do you have aggressive-indent loaded?

FiVo15:01:57

In that case try

(add-to-list 'aggressive-indent-excluded-modes
             'cider-repl-mode)

Bardia Pourvakil03:01:45

I think so thanks for the fix hopefully it works

Bardia Pourvakil03:01:43

Where exactly should I be adding this? Sorry I’m a noob lol

Bardia Pourvakil03:01:26

(defun spacemacs-editing/init-aggressive-indent ()
  (use-package aggressive-indent
    :defer t
    :init
    (progn
      (spacemacs|add-toggle aggressive-indent
        :mode aggressive-indent-mode
        :documentation "Always keep code indented."
        :evil-leader "tI")
      (spacemacs|add-toggle aggressive-indent-globally
        :mode global-aggressive-indent-mode
        :documentation "Always keep code indented globally."
        :evil-leader "t C-I"))
    :config
    (progn
      (add-hook 'diff-auto-refine-mode-hook 'spacemacs/toggle-aggressive-indent-off)
      (spacemacs|diminish aggressive-indent-mode " Ⓘ" " I"))))

FiVo17:01:24

@bardiapourvakil Just add it as toplevel form in your .emacs or you can try something in the :config part. Something along the lines of (add-hook 'cider-repl-mode-hook 'spacemaces/toggle-aggressive-indent-off). I don't know if that hook exists.

drewverlee23:01:19

err whats the best way to do repl driven develompent with libraries included as deps with a relative path. I know there is probably a way to use the cider debugger to step into functions. as one option. Is there a way to, idk start a repl in the main app then connect to it from the lib?

jumar07:01:58

What do you mean by relative path?

jumar07:01:15

Or rather what you are trying to achieve?

drewverlee15:01:43

say you have project A with a dep "../some-lib" and you start a repl for project A then notice an issue with how its communicating with some-lib. So you want to see how some-lib is using the data you passed it.

drewverlee21:01:08

actually, on second try, ^ what i described seems to just work already.