(defmethod customize-instance ((buffer buffer) &key)
  (setf (slot-value buffer 'default-modes
                    '(nyxt/mode/certificate-exception:certificate-exception-mode
                      nyxt/mode/autofill:autofill-mode
                      nyxt/mode/spell-check:spell-check-mode
                      nyxt/mode/search-buffer:search-buffer-mode
                      nyxt/mode/hint:hint-mode nyxt/mode/document:document-mode
                      nyxt/mode/password:password-mode
                      nyxt/mode/bookmark:bookmark-mode
                      nyxt/mode/annotate:annotate-mode
                      nyxt/mode/history:history-mode
                      nyxt/mode/blocker:blocker-mode
                      nyxt/mode/reduce-tracking:reduce-tracking-mode
                      nyxt/mode/bookmarklets:bookmarklets-mode base-mode))))

(define-configuration (web-buffer)
  ((default-modes (pushnew 'nyxt/mode/style:dark-mode %slot-value%))))

(define-configuration (input-buffer)
  ((default-modes (pushnew 'nyxt/mode/vi:vi-normal-mode %slot-value%))))

(define-configuration (prompt-buffer)
  ((default-modes (pushnew 'nyxt/mode/vi:vi-insert-mode %slot-value%))))
