A few months ago I noticed undo-tree was not working properly for me, though it had never been a problem in the past. Whenever I opened an existing file on my computer and edited it, trying to undo would give me a message saying "Undo-tree mode not enabled in buffer." If I manually enabled undo-tree mode per buffer everything would work fine, however that had never been the case before. It simply worked with my config.
Strangely it seems to be a key binding causing the problem. I'm using general.el to do my keybinds. Here is a minimal config that reproduces the issue:
(require 'package) (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) (package-initialize) (unless package-archive-contents (package-refresh-contents)) (unless (package-installed-p 'use-package) (package-install 'use-package)) (require 'use-package) (setq use-package-always-ensure t) (use-package evil :init (setq evil-want-integration t) (setq evil-want-keybinding nil) (setq evil-want-C-u-scroll t) (setq evil-want-C-i-jump nil) (setq evil-ex-search-vim-style-regexp t) (setq evil-respect-visual-line-mode t) ; (defvar my/cur-window nil) :config (evil-mode 1) (setq evil-vsplit-window-right t) (setq evil-split-window-below t) (setq evil-want-fine-undo t)) (use-package evil-collection :after evil :config (evil-collection-init)) (use-package general :ensure t :config (general-evil-setup t)) (use-package undo-tree :ensure t :config (evil-set-undo-system 'undo-tree) (global-undo-tree-mode 1)) (nvmap :keymaps 'override "/" 'swiper "C-/" 'counsel-rg)
If you remove the very last line (the counsel-rg binding) things seem to work as they should. I don't understand what's causing this issue, and how to fix it.