 (map! :v "-" #'lsp-format-region)
 
 (map! :n "L" (lambda () (interactive)
-              (call-interactively 'lsp-execute-code-action)))
+               (call-interactively 'lsp-execute-code-action)))
 
 (map! :n ",e" (lambda () (interactive)
                 (call-interactively 'projectile-run-project "cargo run")))

;; (define-key evil-normal-state-map (kbd "C-x h f") 'describe-function)
;; (define-key evil-normal-state-map (kbd "C-x h v") 'describe-variable)

; (define-key evil-normal-state-map (kbd "C-d") 'scroll-up-command)
; (define-key evil-normal-state-map (kbd "C-u") 'scroll-down-command)

;; Insert mode as well
;; Makes C-e behave same as in Emacs. C-a works out of the box
;; (define-key evil-motion-state-map (kbd "C-e") nil)

(map! :n "<left>" (lambda ()
                    (interactive)
                    (call-interactively 'evil-window-decrease-width)
                    (call-interactively 'evil-window-decrease-width)
                    (call-interactively 'evil-window-decrease-width)
                    (call-interactively 'evil-window-decrease-width)
                    (call-interactively 'evil-window-decrease-width)))

(map! :n "<right>" (lambda ()
                    (interactive)
                    (call-interactively 'evil-window-increase-width)
                    (call-interactively 'evil-window-increase-width)
                    (call-interactively 'evil-window-increase-width)
                    (call-interactively 'evil-window-increase-width)
                    (call-interactively 'evil-window-increase-width)))

;; (define-key evil-normal-state-map (kbd "<right>") (lambda () (interactive)
;;                                                 (call-interactively 'evil-window-increase-width)

;;                                                 ))


(define-key evil-normal-state-map (kbd "<up>")
  (lambda () (interactive)
    (call-interactively 'evil-window-decrease-height)
    (call-interactively 'evil-window-decrease-height)
    (call-interactively 'evil-window-decrease-height)
    (call-interactively 'evil-window-decrease-height)
    (call-interactively 'evil-window-decrease-height)))


(define-key evil-normal-state-map (kbd "<down>")
  (lambda () (interactive)
    (call-interactively 'evil-window-increase-height)
    (call-interactively 'evil-window-increase-height)
    (call-interactively 'evil-window-increase-height)
    (call-interactively 'evil-window-increase-height)
    (call-interactively 'evil-window-increase-height)))



                                        ; (defadvice! hy/evil-scroll-advice (fn count)
                                        ;   :around #'evil-scroll-down
                                        ;   :around #'evil-scroll-up
                                        ;   (setq count (/ (window-body-height) 8))
                                        ;   (funcall fn count))

(setq which-key-idle-delay 0.25)

