 
 (straight-use-package 'use-package)
 (setq straight-use-package-by-default t)
+(package-initialize)
 
 ;(use-package init-loader)
 
-(use-package jedi)
-(use-package flymake-cursor)
-(use-package elpy)
-(use-package flycheck)
-(use-package js3-mode)
-(use-package yasnippet)
-(use-package cider)
 
 ;;; Screen size specific configuration
 (setq initial-frame-alist

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

;;; Haskell-mode
;(load "haskell-site-file")
(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
(elpy-enable)
(setq elpy-rpc-virtualenv-path "~/.pyenv/versions/elpy")
(add-hook 'elpy-mode-hook
          '(lambda ()
             (when (eq major-mode 'python-mode)
               (prog1
                   (add-hook 'before-save-hook 'elpy-black-fix-code nil t)))))

(require 'tramp-cmds)

;;; js3 mode
(add-hook 'js3-mode-hook
          (lambda ()
            (setq js3-auto-indent-p t)
            (setq js3-curly-indent-offset 0)
            (setq js3-enter-indents-newline t)
            (setq js3-expr-indent-offset 2)
            (setq js3-indent-on-enter-key t)
            (setq js3-lazy-commas t)
            (setq js3-lazy-dots t)
            (setq js3-lazy-operators t)
            (setq js3-paren-indent-offset 2)
            (setq js3-square-indent-offset 4)))


(add-hook 'find-file-not-found-hooks 'auto-insert)

;;; Yasnippet
(use-package yasnippet
  :straight t
  :init
  (add-hook 'prog-mode-hook #'yas-minor-mode)
  (use-package yasnippet-snippets))
    


;;; C-mode
(setq common-function-for-c-hook
         (lambda ()
           (local-set-key (kbd "C-; c") 'compile)
