   ;; Highlights delimiters such as parentheses, brackets or braces
   ;; according to their depth.
   :hook ((prog-mode . rainbow-delimiters-mode)))
-
-(use-package smartparens
-  ;; https://github.com/Fuco1/smartparens
-  ;; Minor mode for Emacs that deals with parens pairs and tries to be smart about it.
-  :init (setq sp-highlight-pair-overlay nil)
-  :config
-  (require 'smartparens-config)
-  (smartparens-global-mode t)
-  (electric-pair-mode 0))
 
 ;;;;  Highlight matching parentheses
 

              "Prevent \"Active processes exist\" query when quitting Emacs."
              (cl-letf (((symbol-function #'process-list) (lambda ())))
                ad-do-it))))

;;;; Scrolling performance

(setq fast-but-imprecise-scrolling t
      scroll-conservatively 0
      line-move-visual t)

(use-package fast-scroll
  ;; https://github.com/ahungry/fast-scroll
  ;; Ensure scrolling remains fast
  :init (setq fast-scroll-throttle 0.05)
  :config
  (fast-scroll-config)
  (fast-scroll-mode 1))

(with-eval-after-load "fast-scroll"
  (add-hook 'fast-scroll-start-hook
            (lambda ()
              (doom-modeline-mode 1)))
  (add-hook 'fast-scroll-end-hook
            (lambda ()
              ;; "Hack" to make sure that fontification refreshes
              (save-excursion
                (font-lock-fontify-region (window-start) (window-end)))
              )))

;;;; Scrolling behaviour


;; https://emacs.stackexchange.com/questions/28736/emacs-pointcursor-movement-lag
(setq auto-window-vscroll nil)

(electric-pair-mode 1)

;;;; Better electric indentation

(defvar-local danylo/do-electric-indent t)
