 ;; fancy icons for dired
 (use-package all-the-icons-dired
   :straight t
-  :hook (dired-mode . all-the-icons-dired-mode)
+  :hook (dired-mode . (lambda () (all-the-icons-dired-mode 1)))
+  (wdired-mode . (lambda () (all-the-icons-dired-mode 0)))
   :after (all-the-icons dired))
 
 ;; dependence for dired-hacks-*

;; line numbers
(global-display-line-numbers-mode 1)
;; Turn off unbroken single line wrap indicators
(fringe-mode '(0 . 0))
;; highlight current line
(global-hl-line-mode)

;; Font settings
(add-to-list 'default-frame-alist '(font . "Iosevka Medium-12"))

;; Keep backups and autosaves in /tmp
(setq backup-directory-alist
      `(("." . ,temporary-file-directory)))
(setq auto-save-file-name-transforms
      `((".*" ,temporary-file-directory t)))

;; GPG encryption
(when (string-equal system-type 'darwin)

  :config
  (global-undo-tree-mode))

;; project manager
(use-package projectile
  :straight t
  :config
  (projectile-mode)
  :custom
  (projectile-project-search-path '("~/Code/"))
  :general
  (tn/leader-def
	:keymaps '(override projectile-mode-map)
	"p" 'projectile-command-map))

;; counsel integration for projectile
(use-package counsel-projectile
  :straight t)

;; smart managing of parentheses
(use-package paredit
