Search code examples
emacsspacemacs

Switch off `ivy-use-virtual-buffers` in spacemacs


I would like to disable ivy-use-virtual-buffers in spacemacs.

However, adding (setq ivy-use-virtual-buffers nil) in either user-init or user-config doesn't work. Oh no!

I believe the source of the problem is this line in the spacemacs package initialisation.

 (with-eval-after-load 'recentf       
    (setq ivy-use-virtual-buffers t))

Source: https://github.com/syl20bnr/spacemacs/blob/bd7ef98e4c35fd87538dd2a81356cc83f5fd02f3/layers/%2Bcompletion/ivy/packages.el#L146-L150

But I'm not sure of the correct way to trump this setting.


Solution

  • You can simply add your own with-eval-after-load. In your user-config section, insert

    (with-eval-after-load 'recentf
       (setq ivy-use-virtual-buffers nil))