Here's one way to do it (SPC f e d
to get to your config file, then you could put this in the existing dotspacemacs-user-config
function) -- here I've shown how to get both grep and compilation buffers popping up on the right:
(require 'dash)
(defun my/popwin-on-right (alist-item)
(let ((props-alist (seq-partition (cdr alist-item) 2)))
(setf (alist-get :position props-alist) '(right))
(setf (alist-get :height props-alist) '(1.0))
(setf (alist-get :width props-alist) '(0.5))
(let ((flattened (apply #'append props-alist)))
(cons (car alist-item) flattened))))
(custom-set-variables
'(popwin:special-display-config
(--map-when (-contains? '("*compilation*" "*grep*") (car it))
(my/popwin-on-right it)
popwin:special-display-config)))
or you could just set popwin:special-display-config
more directly, replacing the --map-when
call there with a literal list. Just view the variable's existing value e.g. using SPC SPC ielm <RET>
to get nice formatting, then cut and paste it in (you'll need to quote the list using '
). Or you could do what I do when I want to set a customizable variable as a literal value: use SPC SPC customize
, let that update the end of your spacemacs config file with its blob of generated code, then copy out the custom-set-variables it generates into your dotspacemacs-user-config
, and delete the blob of code that customize
generated).