 (add-hook 'find-file-not-found-hooks 'auto-insert)
 
 ;;; Yasnippet
-(require 'yasnippet)
-(yas-global-mode t)
+(use-package yasnippet
+  :straight t
+  :init
+  (add-hook 'prog-mode-hook #'yas-minor-mode)
+  (use-package yasnippet-snippets))
+    
 
-;;; Auto complete
-(require 'auto-complete-config)
-(ac-config-default)
-(global-auto-complete-mode t)
 
 ;;; C-mode
-
 (setq common-function-for-c-hook
          (lambda ()
            (local-set-key (kbd "C-; c") 'compile)

(setq inhibit-startup-message t)

;; Package management
(defvar bootstrap-version)
(let ((bootstrap-file
       (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))

(add-hook 'cuda-mode-hook common-function-for-c-hook)

;;; Haskell-mode
(use-package haskell-mode
  :straight t
  :init
  (add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
  (add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
  (autoload 'ghc-init "ghc" nil t)
  (add-hook 'haskell-mode-hook (lambda () (ghc-init))))


;;; elpy
(use-package pyvenv
  :straight t)

(use-package elpy
  :straight t
  :init
  (setq elpy-modules '(elpy-module-company
                       elpy-module-eldoc
                       elpy-module-flymake
                       elpy-module-pyvenv
                       elpy-module-yasnippet
                       elpy-module-sane-defaults))
  (add-hook 'elpy-mode-hook
            (lambda ()
              (add-hook 'before-save-hook 'elpy-black-fix-code nil t)))
  (setq elpy-rpc-virtualenv-path "~/.pyenv/versions/elpy")
  (elpy-enable))

;; latex
(setq tex-default-mode 'latex-mode)
(setq tex-start-commands "")
(setq tex-print-file-extension ".pdf")
(setq latex-run-command "lualatex")
(setq tex-dvi-view-command "open")

(use-package jedi)
(use-package flymake-cursor)
(use-package elpy)
(use-package flycheck)
(use-package js2-mode)
(use-package cider)
(use-package tramp)

