 (with-eval-after-load 'yasnippet
   ;; diable pre-defined snippet
   (setq yas-snippet-dirs (list yas--default-user-snippets-dir))
-  (add-hook 'yas-minor-mode-hook
-            #'(lambda ()
-              (yas-activate-extra-mode 'fundamental-mode)))
+  (add-hook 'yas-minor-mode-hook (lambda ()
+                                   (yas-activate-extra-mode 'fundamental-mode)))
   (advice-add #'yas-new-snippet :after (lambda (&optional _) (evil-insert nil))))
   ;; (add-hook 'evil-insert-state-exit-hook #'yas-abort-snippet))
 

;; Put last selected bookmark on top
(setq bookmark-sort-flag nil)
(defvar bookmark-order-changed nil)
(advice-add #'bookmark-save :after
            #'(lambda () (setq bookmark-order-changed nil)))
(defun bookmark-put-last-use-on-top ()
  (let ((last (bookmark-get-bookmark bookmark-current-bookmark)))
    (setq bookmark-alist (delq last bookmark-alist))

      )
(eval-after-load 'company '(add-to-list 'company-backends 'company-ghc))

(add-hook 'evil-insert-state-entry-hook (lambda () (global-company-mode 1)))
(add-hook 'evil-insert-state-exit-hook #'company-abort)


(declare-function yas-activate-extra-mode 'yasnippet)
(declare-function yas-abort-snippet 'yasnippet)
(declare-function yas-new-snippet 'yasnippet)
(setq yas-wrap-around-region t
      yas-triggers-in-field t
      )
