Magit opens with a vertical split (that is it takes up the bottom half of the frame)
I would prefer magit to open with a horizontal split (that is I want it to take up the right half of the frame)
My config can be found here: https://github.com/azy2/doom-emacs-private in-case this is my fault.
Any help would be appreciated.
That's the default setting. To open with horizontal split, add the following to your config:
(set! :popup "^.*magit" '((slot . -1) (side . right) (size . 80)) '((select . t)))
(set! :popup "^\\*magit.*popup\\*" '((slot . 0) (side . right)) '((select . t)))
(set! :popup "^.*magit-revision:.*" '((slot . 2) (side . right) (window-height . 0.6)) '((select . t)))
(set! :popup "^.*magit-diff:.*" '((slot . 2) (side . right) (window-height . 0.6)) '((select)))
You can tweak the size (window width) to the value you want.
Will the above snippet help with Magit popping up alongside a Cider REPL buffer (they are implemented with the custom popup code in Doom believe?).

Magit is unusable at this size for me. Closing the Cider REPL window and running magit-status again fixes things with Magit showing up in one of my other splits.
A small tweak to @fuxialexander's rules should do the trick:
(set! :popup "^.*magit" '((slot . -1) (vslot . 1) (side . right) (size . 80)) '((select . t)))
(set! :popup "^\\*magit.*popup\\*" '((slot . 0) (vslot . 1) (side . right)) '((select . t)))
(set! :popup "^.*magit-revision:.*" '((slot . 2) (vslot . 1) (side . right) (window-height . 0.6)) '((select . t)))
(set! :popup "^.*magit-diff:.*" '((slot . 2) (vslot . 1) (side . right) (window-height . 0.6)) '((select)))
The property to pay attention to is vslot, which determines where (vertically) the popup is opened. vslot defaults to 0, and any two popups with the same vslot will be shown side-by-side, like you are seeing. A higher vslot means "further away from the center of the frame", and a lower vslot (including negative numbers) means "closer to the center of the frame".
slot is similar, but controls horizontal positioning. Higher slot = further right, lower slot = further left.
Hope that helps!
I believe the latest magit update changed the name of some buffers and removed the * in the names.
If running the latest magit, you might need this rule instead:
(set! :popup "magit" '((slot . -1) (vslot . 1) (side . right) (size . 80)) '((select . t)))
Notice that ^.*magit has changed to "magit". You might need to adapt more names.
@UndeadKernel ^.*magit should works, the * here is not a escaped \\*, it's for greedy matching.
@fuxialexander Duh, you are right. My regex-fu was absent today. I'll blame it on the change to summer time. Yes, indeed, it's because we just changed to summer time...
@azy2 Can I consider this issue resolved?
Yes! Thanks everyone for the help.
Most helpful comment
That's the default setting. To open with horizontal split, add the following to your config:
You can tweak the
size(window width) to the value you want.