                      web-mode
                      js2-mode
                      rust-mode
-                     smartparens
                      esup
                      smart-hungry-delete
                      helpful
                      dired-collapse
                      dired-rainbow
-                     auto-package-update
                      ))
 
 (if (file-exists-p "~/rtags/src")

(global-set-key (kbd "C-a") 'crux-move-beginning-of-line)
(global-set-key (kbd "C-c d") 'crux-duplicate-current-line-or-region)

(autoload 'zap-up-to-char "misc")
(global-set-key (kbd "M-z") 'zap-up-to-char)

(with-eval-after-load 'whitespace
  (diminish 'whitespace-mode))

(setq whitespace-line-column 90
      whitespace-style '(face trailing newline))

(global-set-key (kbd "M-\\") 'shrink-whitespace)

(autoload 'er/expand-region "expand-region")
(global-set-key (kbd "C-=") 'er/expand-region)

(global-set-key (kbd "C-c r") 'vr/replace)

(diminish 'eldoc-mode)

(quelpa '(vc-darcs :fetcher github :repo "velkyel/vc-darcs"))
(setq vc-disable-async-diff nil)                ;; hotfix
(add-to-list 'vc-handled-backends 'DARCS t)
(require 'vc-darcs)
(add-hook 'find-file-hooks 'vc-darcs-find-file-hook)

(require 'js2-mode)
(add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode))
(setq js-indent-level 2)
(define-key js2-mode-map (kbd "M-.") 'dumb-jump-go)
(define-key js2-mode-map (kbd "M-,") 'dumb-jump-back)
;; (define-key js2-mode-map (kbd "C-.") 'imenu)

(quelpa '(inf-js :fetcher github :repo "velkyel/inf-js"))
(require 'inf-js)
(setq inf-js-program '("localhost" . 5555))
(add-hook 'js2-mode-hook 'inf-js-minor-mode)
;; (js2-imenu-extras-mode 1)

(quelpa '(hlsl-mode :fetcher github :repo "darfink/hlsl-mode"))
(require 'hlsl-mode)
(add-to-list 'auto-mode-alist '("\\.hlsl\\'" . hlsl-mode))

;; (quelpa '(inf-femtolisp :fetcher github :repo "velkyel/inf-femtolisp"))
;; (autoload 'inf-femtolisp "inf-femtolisp" "Run an inferior Femtolisp process" t)
