123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385 |
- ;;; Commentary:
- ;;; Sets up major minor modes for Emacs
- ;;; Code:
- (require 'package)
- (setq use-package-always-ensure t)
- (add-to-list 'package-archives
- '("melpa-stable" . "http://stable.melpa.org/packages/") t)
- (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t)
- (package-initialize)
- ;; TODO: install issues (pdf-tools-install)
- (setq-default indent-tabs-mode nil)
- (scroll-bar-mode -1)
- (use-package evil
- :diminish undo-tree-mode
- :config (evil-mode 1)
- :bind (:map evil-normal-state-map
- ("l" . evil-search-next)))
- (use-package evil-surround
- :config (global-evil-surround-mode 1))
- (use-package evil-org)
- (use-package evil-dvorak
- :config (global-evil-dvorak-mode 1)
- :diminish evil-dvorak-mode)
- (use-package god-mode)
- (use-package evil-god-state
- :bind (:map evil-normal-state-map
- ("," . evil-execute-in-god-state)
- :map evil-god-state-map
- ("ESC" . evil-god-state-bail)))
- (use-package magit
- :bind (:map evil-normal-state-map ("C-c C-s" . magit-status)))
- (use-package evil-magit)
- (use-package flx-ido
- :init
- (setq ido-enable-flex-matching t)
- (setq ido-use-faces nil)
- :config
- (ido-mode 1)
- (ido-everywhere 1)
- (flx-ido-mode 1))
- (use-package helm
- :bind ("M-x" . helm-M-x))
- (use-package projectile
- :config
- (projectile-global-mode 1)
- (use-package persp-projectile
- :config (persp-mode))
- :diminish projectile-mode)
- ;; not sure if persp-switch is covered by projectile
- ;(define-key projectile-mode-map (kbd "s-s") 'projectile-persp-switch-project)
- (use-package ace-jump-mode
- :bind (:map evil-normal-state-map
- ("f" . ace-jump-mode)))
- (use-package flycheck
- :init (add-hook 'js-mode-hook (lambda () (flycheck-mode t))))
- (use-package flyspell)
- ;;; C/C++
- (use-package cmake-ide
- :init (use-package rtags)
- :config (cmake-ide-setup))
- ;; Git settings
- (use-package git-gutter+
- :config (global-git-gutter+-mode))
- (use-package rainbow-delimiters
- :init
- (add-hook 'prog-mode-hook 'rainbow-delimiters-mode)
- (add-hook 'geiser-repl-mode-hook 'rainbow-delimiters-mode)
- (add-hook 'cider-repl-mode-hook 'rainbow-delimiters-mode))
- (use-package yasnippet :config (yas-global-mode 1))
- (load-file (concat default-directory "Dev/emacs/evil-paredit/evil-paredit.el"))
- (use-package paredit
- ;(autoload 'enable-paredit-mode "paredit" "Turn on pseudo-structural editing of Lisp code." t)
- :init
- (add-hook 'emacs-lisp-mode-hook #'enable-paredit-mode)
- (add-hook 'eval-expression-minibuffer-setup-hook #'enable-paredit-mode)
- (add-hook 'ielm-mode-hook #'enable-paredit-mode)
- (add-hook 'lisp-mode-hook #'enable-paredit-mode)
- (add-hook 'lisp-interaction-mode-hook #'enable-paredit-mode)
- (add-hook 'scheme-mode-hook #'enable-paredit-mode)
- (add-hook 'emacs-lisp-mode-hook 'evil-paredit-mode)
- (add-hook 'scheme-mode-hook 'evil-paredit-mode))
- ;;; GUIX
- (let ((dir (concat default-directory "Dev/guix/guix/emacs")))
- (add-to-list 'load-path dir)
- (setq guix-load-path dir))
- (require 'guix-autoloads nil t)
- ;; PY
- (use-package company-jedi
- :init
- (add-hook 'python-mode-hook
- (lambda ()
- (add-to-list 'company-backends 'company-jedi))))
- ;;; ANDROID
- (use-package android-mode
- :init
- (setq android-mode-sdk-dir
- (concat default-directory ".buildozer/android/platform/android-sdk-21"))
- (setq android-mode-builder 'gradle)
- (setq android-mode-root-file-plist
- (quote
- (ant "AndroidManifest.xml" gradle "gradlew" maven "AndroidManifest.xml")))
- :config
- (add-hook 'gud-mode-hook
- (lambda ()
- (add-to-list
- 'gud-jdb-classpath
- (concat default-directory
- ".buildozer/android/platform/android-sdk-21/platforms/android-19/android.jar")))))
- ;;; php
- (use-package php-mode)
- (use-package phpcbf
- :config (add-hook 'php-mode-hook 'phpcbf-enable-on-save)
- (custom-set-variables
- '(phpcbf-executable (concat default-directory ".composer/vendor/bin/phpcbf"))))
- (use-package multiple-cursors
- :bind
- ("C->" . mc/mark-next-like-this)
- ("C-<" . mc/mark-previous-like-this)
- ("C-c C-<" . mc/mark-all-like-this))
- (use-package tagedit
- :bind (:map html-mode-map
- ("C-<right>" . tagedit-forward-slurp-tag)
- ("C-<left>" . tagedit-forward-barf-tag)
- ("M-r" . tagedit-raise-tag)
- ("M-s" . tagedit-splice-tag)
- ("M-J" . tagedit-join-tags)
- ("M-S" . tagedit-split-tag)
- ("M-?" . tagedit-convolute-tags)
- ("C-k" . tagedit-kill)
- ("s-k" . tagedit-kill-attribute))
- :config (tagedit-add-experimental-features))
- (use-package clojure-mode
- :init
- (add-hook 'clojure-mode-hook 'paredit-mode)
- (add-hook 'clojure-repl-mode-hook 'paredit-mode))
- ;;; TODO: resolve colliding bindings w/ geiser
- (use-package cider
- :init
- (add-hook 'clojure-mode-hook 'evil-paredit-mode)
- (add-hook 'clojure-repl-mode-hook 'evil-paredit-mode)
- :bind (:map evil-normal-state-map
- ("M-." . cider-find-var)
- ("M-," . cider-pop-back)
- ("M-e" . cider-eval-defun-at-point)
- ("M-b" . cider-eval-buffer)))
- (use-package clj-refactor
- :config
- (add-hook 'clojure-mode-hook 'clj-refactor-mode)
- (cljr-add-keybindings-with-prefix "C-c C-r"))
- (use-package flycheck-pos-tip
- :no-require t
- :config
- (setq flycheck-display-errors-function #'flycheck-pos-tip-error-messages))
- (use-package geiser
- :no-require t
- :init (add-hook 'geiser-repl-mode-hook 'evil-paredit-mode)
- :bind (:map evil-normal-state-map
- ("M-." . geiser-edit-symbol-at-point)
- ("M-," . geiser-pop-symbol-stack)))
- (add-hook 'after-init-hook 'global-company-mode)
- (autoload 'octave-mode "octave-mod" nil t)
- (setq auto-mode-alist
- (cons '("\\.m$" . octave-mode) auto-mode-alist))
- (autoload 'run-octave "octave-inf" nil t)
- (add-hook 'octave-mode-hook
- (lambda ()
- (abbrev-mode 1)
- (auto-fill-mode 1)
- (if (eq window-system 'x)
- (font-lock-mode 1))))
- (use-package tex
- :ensure auctex
- :init
- (add-hook 'LaTeX-mode-hook 'turn-on-reftex)
- (add-hook 'LaTeX-mode-hook 'visual-line-mode)
- (add-hook 'LaTeX-mode-hook 'flyspell-mode)
- (add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)
- (setq TeX-auto-save t)
- (setq TeX-parse-self t)
- (setq-default TeX-master nil))
- (defun maybe-linux-style ()
- "Set c-style to linux format."
- (when (and buffer-file-name
- (string-match "linux" buffer-file-name))
- (c-set-style "Linux")))
- ;; Edit sudo files
- (defadvice ido-find-file (after find-file-sudo activate)
- (unless (and buffer-file-name
- (file-writable-p buffer-file-name))
- (find-alternate-file (concat "/sudo:root@localhost:" buffer-file-name))))
- ;; Create backup files in .emacs-backup instead of everywhere
- (defvar user-temporary-file-directory "~/.emacs-backup")
- (make-directory user-temporary-file-directory t)
- (setq backup-by-copying t)
- (setq backup-directory-alist
- `(("." . ,user-temporary-file-directory)
- (,tramp-file-name-regexp nil)))
- (setq auto-save-list-file-prefix
- (concat user-temporary-file-directory ".auto-saves-"))
- (setq auto-save-file-name-transforms
- `((".*" ,user-temporary-file-directory t)))
- (custom-set-variables
- ;; custom-set-variables was added by Custom.
- ;; If you edit it by hand, you could mess it up, so be careful.
- ;; Your init file should contain only one such instance.
- ;; If there is more than one, they won't work right.
- '(TeX-view-program-selection
- (quote
- (((output-dvi has-no-display-manager)
- "dvi2tty")
- ((output-dvi style-pstricks)
- "dvips and gv")
- (output-dvi "xdvi")
- (output-pdf "xldf")
- (output-html "xdg-open"))))
- '(android-mode-sdk-dir "~/.buildozer/android/platform/android-sdk-21")
- '(ansi-color-names-vector
- ["#0a0814" "#f2241f" "#67b11d" "#b1951d" "#4f97d7" "#a31db1" "#28def0" "#b2b2b2"])
- '(ansi-term-color-vector
- [unspecified "#151515" "#FF0086" "#00C918" "#ABA800" "#3777E6" "#AD00A1" "#3777E6" "#D0D0D0"] t)
- '(cider-default-repl-command "repl")
- '(cider-lein-command "lein")
- '(cider-lein-parameters "-U with-profile +test repl :headless")
- '(compilation-message-face (quote default))
- '(cua-global-mark-cursor-color "#2aa198")
- '(cua-normal-cursor-color "#657b83")
- '(cua-overwrite-cursor-color "#b58900")
- '(cua-read-only-cursor-color "#859900")
- '(custom-enabled-themes (quote (spacemacs-dark)))
- '(custom-safe-themes
- (quote
- ("c7a9a68bd07e38620a5508fef62ec079d274475c8f92d75ed0c33c45fbe306bc" "076a94693c0f6fa99612121c18ccb48bfbd842c05b6b9ed04b6e7e0a0f95a53e" "bffa9739ce0752a37d9b1eee78fc00ba159748f50dc328af4be661484848e476" "fa2b58bb98b62c3b8cf3b6f02f058ef7827a8e497125de0254f56e373abee088" "e2e4e109357cfcebccb17961950da6b84f72187ade0920a4494013489df648fe" "75c0b9f9f90d95ac03f8647c75a91ec68437c12ff598e2abb22418cd4b255af0" "bf81a86f9cfa079a7bb9841bc6ecf9a2e8999b85e4ae1a4d0138975921315713" "e24679edfdea016519c0e2d4a5e57157a11f928b7ef4361d00c23a7fe54b8e01" "d43120398682953ef18fd7e11e69c94e44d39bb2ab450c4e64815311542acbff" "cdfb22711f64d0e665f40b2607879fcf2607764b2b70d672ddaa26d2da13049f" "f245c9f24b609b00441a6a336bcc556fe38a6b24bfc0ca4aedd4fe23d858ba31" "a7b47876e5da7cac6f5e61cca7a040a365ca2c498823654bd4076add8edf34c5" "232f715279fc131ed4facf6a517b84d23dca145fcc0e09c5e0f90eb534e1680f" "aed73c6d0afcf2232bb25ed2d872c7a1c4f1bda6759f84afc24de6a1aec93da8" "e8e744a1b0726814ac3ab86ad5ccdf658b9ff1c5a63c4dc23841007874044d4a" "101a10b15bbbd0d5a0e56e4773e614962197886780afb2d62523a63a144ad96c" "e254f8e18ba82e55572c5e18f3ac9c2bd6728a7e500f6cc216e0c6f6f8ea7003" "9e87bddff84cbce28c01fa05eb22f986d770628fa202cd5ca0cd7ed53db2f068" "f2503f0a035c2122984e90eb184185769ee665de5864edc19b339856942d2d2d" "09669536b4a71f409e7e2fd56609cd7f0dff2850d4cbfb43916cc1843c463b80" "76bd62f6ce376bf0597fab7f478eaa98cd94a7b41f0ae46de63a958fbe99c1d9" "b2028956188cf668e27a130c027e7f240c24c705c1517108b98a9645644711d9" "0b6645497e51d80eda1d337d6cabe31814d6c381e69491931a688836c16137ed" "8aebf25556399b58091e533e455dd50a6a9cba958cc4ebb0aab175863c25b9a4" "8db4b03b9ae654d4a57804286eb3e332725c84d7cdab38463cb6b97d5762ad26" "d677ef584c6dfc0697901a44b885cc18e206f05114c8a3b7fde674fce6180879" default)))
- '(fci-rule-color "#eee8d5")
- '(geiser-arguile-binary "/home/sapientech/Dev/guile/bin/guile")
- '(geiser-arguile-init-file "~/.arguile-geiser.scm")
- '(geiser-arguile-load-path (quote ("/home/sapientech/Dev/arguile")))
- '(geiser-chicken-load-path (quote ("/home/user/Development/ai/aima-chicken/aima.scm")))
- '(geiser-guile-binary "/home/sapientech/Dev/guile/bin/guile")
- '(geiser-guile-load-path
- (quote
- ("/home/sapientech/Dev/guile/" "/home/sapientech/Dev/guix/guix/" "/home/sapientech/Dev/guix-packages/" "/home/sapientech/Dev/guile/guile-graph" "/home/sapientech/Dev/web/" "/home/sapientech/Dev/arguile")))
- '(highlight-changes-colors (quote ("#d33682" "#6c71c4")))
- '(highlight-symbol-colors
- (--map
- (solarized-color-blend it "#fdf6e3" 0.25)
- (quote
- ("#b58900" "#2aa198" "#dc322f" "#6c71c4" "#859900" "#cb4b16" "#268bd2"))))
- '(highlight-symbol-foreground-color "#586e75")
- '(highlight-tail-colors
- (quote
- (("#eee8d5" . 0)
- ("#B4C342" . 20)
- ("#69CABF" . 30)
- ("#69B7F0" . 50)
- ("#DEB542" . 60)
- ("#F2804F" . 70)
- ("#F771AC" . 85)
- ("#eee8d5" . 100))))
- '(hl-bg-colors
- (quote
- ("#DEB542" "#F2804F" "#FF6E64" "#F771AC" "#9EA0E5" "#69B7F0" "#69CABF" "#B4C342")))
- '(hl-fg-colors
- (quote
- ("#fdf6e3" "#fdf6e3" "#fdf6e3" "#fdf6e3" "#fdf6e3" "#fdf6e3" "#fdf6e3" "#fdf6e3")))
- '(jdee-server-dir "/home/sapientech/Dev/java")
- '(magit-diff-use-overlays nil)
- '(magit-log-section-arguments (quote ("-n256" "--decorate")))
- '(menu-bar-mode nil)
- '(nrepl-message-colors
- (quote
- ("#dc322f" "#cb4b16" "#b58900" "#546E00" "#B4C342" "#00629D" "#2aa198" "#d33682" "#6c71c4")))
- '(org-agenda-files nil)
- '(package-selected-packages
- (quote
- (php-mode php yaml-mode elixir-mode elixir-yasnippets flycheck-elixir org-evil company-lua smtpmail-multi monokai-theme clj-refactor evil-god evil-god-mode evil-god-state god-mode cider flycheck-pos-tip tex pesp-projectile js2 latex autex clojure cider-mode js2-refactor web-beautify js2-mode weechat clojure-mode evil-surround evil-mc w3m use-package test-simple tagedit swift-mode spacemacs-theme solarized-theme skewer-mode show-css rtags rainbow-delimiters psysh phpcbf php-scratch php-refactor-mode php-eldoc php-auto-yasnippets persp-projectile pandoc ox-pandoc multiple-cursors markdown-mode magit-annex lua-mode loc-changes load-relative kivy-mode jdee irony-eldoc inf-php helm haskell-mode groovy-mode gradle-mode git-gutter+ geiser flyspell-correct flymake-php flycheck-irony flx-ido evil-paredit evil-org evil-magit evil-dvorak ecb composer company-php company-jedi company-irony company-auctex color-theme-solarized cmake-ide base16-theme android-mode ag ace-jump-mode)))
- '(phpcbf-executable (concat default-directory ".composer/vendor/bin/phpcbf"))
- '(phpcbf-standard "PSR2")
- '(pos-tip-background-color "#eee8d5")
- '(pos-tip-foreground-color "#586e75")
- '(safe-local-variable-values
- (quote
- ((eval modify-syntax-entry 43 "'")
- (eval modify-syntax-entry 36 "'")
- (eval modify-syntax-entry 126 "'")
- (bug-reference-bug-regexp . "<https?://\\(debbugs\\|bugs\\)\\.gnu\\.org/\\([0-9]+\\)>"))))
- '(send-mail-function (quote smtpmail-send-it))
- '(smartrep-mode-line-active-bg (solarized-color-blend "#859900" "#eee8d5" 0.2))
- '(smtpmail-smtp-server "smtp.openmailbox.org")
- '(smtpmail-smtp-service 465 t)
- '(term-default-bg-color "#fdf6e3")
- '(term-default-fg-color "#657b83")
- '(tool-bar-mode nil)
- '(vc-annotate-background nil)
- '(vc-annotate-color-map
- (quote
- ((20 . "#dc322f")
- (40 . "#c37300")
- (60 . "#b97d00")
- (80 . "#b58900")
- (100 . "#a18700")
- (120 . "#9b8700")
- (140 . "#948700")
- (160 . "#8d8700")
- (180 . "#859900")
- (200 . "#5a942c")
- (220 . "#439b43")
- (240 . "#2da159")
- (260 . "#16a870")
- (280 . "#2aa198")
- (300 . "#009fa7")
- (320 . "#0097b7")
- (340 . "#008fc7")
- (360 . "#268bd2"))))
- '(vc-annotate-very-old-color nil)
- '(weechat-color-list
- (quote
- (unspecified "#fdf6e3" "#eee8d5" "#990A1B" "#dc322f" "#546E00" "#859900" "#7B6000" "#b58900" "#00629D" "#268bd2" "#93115C" "#d33682" "#00736F" "#2aa198" "#657b83" "#839496")))
- '(xterm-color-names
- ["#eee8d5" "#dc322f" "#859900" "#b58900" "#268bd2" "#d33682" "#2aa198" "#073642"])
- '(xterm-color-names-bright
- ["#fdf6e3" "#cb4b16" "#93a1a1" "#839496" "#657b83" "#6c71c4" "#586e75" "#002b36"]))
- ;;; Add these faces to spacemacs-dark + add new faces for light
- (custom-set-faces
- ;; custom-set-faces was added by Custom.
- ;; If you edit it by hand, you could mess it up, so be careful.
- ;; Your init file should contain only one such instance.
- ;; If there is more than one, they won't work right.
- '(default ((t (:family "SourceCodePro" :foundry "urw" :slant normal :weight normal :height 87 :width normal))))
- '(rainbow-delimiters-depth-1-face ((t (:foreground "red"))))
- '(rainbow-delimiters-depth-2-face ((t (:foreground "dark orange"))))
- '(rainbow-delimiters-depth-3-face ((t (:foreground "yellow"))))
- '(rainbow-delimiters-depth-4-face ((t (:foreground "lawn green"))))
- '(rainbow-delimiters-depth-5-face ((t (:foreground "deep sky blue"))))
- '(rainbow-delimiters-depth-6-face ((t (:foreground "orchid"))))
- '(rainbow-delimiters-depth-7-face ((t (:foreground "spring green"))))
- '(rainbow-delimiters-depth-8-face ((t (:foreground "sienna1")))))
- (provide '.emacs)
- ;;; .emacs ends here
|