Fork me on GitHub
#spacemacs
<
2021-08-09
>
paulspencerwilliams11:08:22

So, I’m suffering ‘Unbalanced parens’ when viewing the reply history C-c M-p and I think it’s caused by me enabling Paredit by default using this hook registration. Can anyone recommend an idiomatic solution to it?

(defun dotspacemacs/user-config ()
  (add-hook 'clojure-mode-hook 'enable-paredit-mode))
I assume it’s actually happening because I’ve old broken repl commands?

Drew Verlee20:08:10

I recommend not using paredit, its a great idea, its just not as integrated into spacemacs. In my dotspacemacs init i have dotspacemacs-smartparens-strict-mode t dotspacemacs-smartparens-closing-parenthesis t

Drew Verlee20:08:59

after much pain, i settled on smartparens, which does everything i can think of and more

paulspencerwilliams05:08:29

Okay, cheers. I’ll have a play with smartparens - it seems pretty well used!

practicalli-johnny05:08:02

Smartparens is paredit that can be used for all languages, not just lisps. It's also maintained, unlike paredit Enable smartparens strict mode globally in the spacemacs.el configuration file to get the strict nature of paredit

dotspacemacs-smartparens-strict-mode t

practicalli-johnny05:08:13

On the rare occasions I use the REPL buffer directly, I have experienced any issues with history. I use Ctrl and the arrow keys to navigate the history in the REPL buffer

Drew Verlee20:08:19

Is there a way to keep the window/buffer layout when you come back from magit actions (such as magit-status). It's really really annoying when i exit and it removed my entire workplace.

practicalli-johnny21:08:18

I use magit in 'fullscreen' mode (or is that maximised). When I use q to quit magit-status it takes me back to the window/buffer layout before I called magit-status

practicalli-johnny21:08:52

You could also try SPC w u for winner-undo

practicalli-johnny21:08:57

SPC g s opens Magit git client full screen (q restores previous layout)

(git :variables
git-magit-status-fullscreen t
  magit-diff-refine-hunk t
  git-enable-magit-todos-plugin t)

Drew Verlee23:08:50

I'll try that, as always, thanks a ton

Drew Verlee13:08:30

SPC w u does the trick. How did you figure that out?

practicalli-johnny18:08:03

Erm, that is what that command does 😁

practicalli-johnny18:08:55

It undoes the last change to the window layout. Admittedly it took me a year to discover that :rolling_on_the_floor_laughing: