 
 (use-package smartparens
   :commands (smartparens-mode)
-  :init (add-hook 'prog-mode-hook 'smartparens-mode))
+  :init (add-hook 'prog-mode-hook 'smartparens-mode)
+  :config (sp-local-pair 'prog-mode "{" nil :post-handlers '((my/create-newline-and-enter-sexp "RET"))))
 
 (use-package project-explorer
   :commands (project-explorer-open project-explorer-toggle)

    (kill-this-buffer))
  (delete-window))


;;; init.el ends here

  ;; C-h erases previous character
  (global-set-key (kbd "C-h") 'delete-backward-char)
  (define-key isearch-mode-map (kbd "C-h") 'isearch-del-char)
  (global-set-key (kbd "s-k") 'evil-scroll-line-up)
  (global-set-key (kbd "s-j") 'evil-scroll-line-down))

