Skip to content

Instantly share code, notes, and snippets.

@mattdeboard
Created April 25, 2017 16:38
Show Gist options
  • Save mattdeboard/c3589a73ddf0046b29eb954593dc4776 to your computer and use it in GitHub Desktop.
Save mattdeboard/c3589a73ddf0046b29eb954593dc4776 to your computer and use it in GitHub Desktop.
;; With numeric ARG, display the tool bar if and only if ARG is
;; positive. Tool bar has icons document (read file), folder (read
;; directory), X (discard buffer), disk (save), disk+pen (save-as),
;; back arrow (undo), scissors (cut), etc.
(tool-bar-mode 0)
;; Get rid of the annoying splash and startup screens
(setq inhibit-splash-screen t
inhibit-startup-message t)
(setq grep-program "egrep")
(setq-default fill-column 72)
;; (eval-after-load 're-builder '(setq reb-re-syntax 'rx))
(setq HOME (expand-file-name "~/"))
(setq PATH (getenv "PATH"))
(setenv "PATH" (concat PATH ":/opt/vagrant/bin:/usr/local/bin:" (concat HOME "bin")))
(setenv "GOPATH" "/usr/bin/go")
(setq GO-PKG-PATH "/usr/lib/go/src/pkg/")
(setq mac-command-modifier 'meta)
;; No more damned beeping
(setq ring-bell-function #'ignore)
(global-set-key (kbd "C-c C-e") 'duplicate-line)
(global-set-key (kbd "<C-tab>") 'other-window)
(global-set-key [(mouse-10)] 'other-window)
(global-set-key "\C-xy" 'clipboard-yank)
(global-set-key "\d" 'delete-backward-char)
(global-set-key (kbd "C-c g") 'ag)
(global-set-key (kbd "C-c m") 'magit-status)
(global-set-key (kbd "C-c n") 'neotree-toggle)
(global-set-key (kbd "<home>") 'beginning-of-line)
(global-set-key (kbd "<end>") 'end-of-line)
;; -----------------
;; package.el config
;; -----------------
(require 'package)
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t)
;; (add-to-list 'package-archives
;; '("melpa-stable" . "http://stable.melpa.org/packages/") t)
(setq package-enable-at-startup nil)
(package-initialize)
(defvar my-packages
'(ag
auto-complete
autopair
cider
clojure-mode
coffee-mode
color-theme
company-inf-ruby ;; Auto-complete for `inf-ruby'
ctable
dash
deferred
direx
eieio
ein
elixir-mode
epc
exec-path-from-shell
fic-mode ;; Highlights FIXME/TODO/BUG etc.
flycheck
flycheck-flow
flymake-coffee
flymake-easy
flymake-python-pyflakes
flymake-ruby
fuzzy
gh
gist
go-autocomplete
go-direx
go-mode
haskell-mode
highlight-parentheses
igrep
inf-ruby ;; Inline Ruby REPL
jedi
jedi-direx
json-mode
logito
lua-mode
magit
markdown-mode
monokai-theme
neotree
pcache
projectile
projectile-rails
py-autopep8
pg
pkg-info
popup
pylint
racer ;; Rust autocomplete
rcirc-notify
robe ;; code nav & completion for Ruby
ruby-end ;; auto-insert `end` in Ruby
rvm ;; Integration with RVM
spaceline
spaceline-all-the-icons
spacemacs-theme
tabulated-list
tern ;; TernJS-backed autocomplete
terraform-mode
virtualenv
web-mode
yaml-mode))
;; powerline
(require 'spaceline-config)
(spaceline-all-the-icons-theme)
;; projectile-mode
(projectile-global-mode)
;; magit
(add-hook 'magit-mode-hook 'turn-on-magit-gh-pulls)
(defun my-install-packages ()
(interactive)
(package-refresh-contents)
(mapc #'(lambda (package)
(unless (package-installed-p package)
(package-install package)))
my-packages))
(when (memq window-system '(mac ns))
(exec-path-from-shell-initialize))
;; automatically clean up bad whitespace
(setq whitespace-action '(auto-cleanup))
;; only show bad whitespace
(setq whitespace-style '(face
lines-tail
;empty
trailing
space-before-tab
;indentation
space-after-tab))
(setq whitespace-line-column 100)
(setq default-buffer-file-coding-system 'utf-8-unix)
(setq dotfiles-dir (concat HOME ".emacs.d/"))
(visual-line-mode)
(column-number-mode)
(linum-mode)
(define-key global-map (kbd "RET") 'newline-and-indent)
(setq gist-view-gist t)
(setq require-final-newline t)
(add-hook 'html-mode-hook
(lambda ()
;; Default indentation is usually 2 spaces, changing to 4.
(set (make-local-variable 'sgml-basic-offset) 4)))
(setq sgml-basic-offset 4)
(setq-default default-tab-width 2)
(setq-default tab-width 2)
(setq-default indent-tabs-mode nil)
(setq coding-system-for-write 'utf-8-unix)
;; Path bindings
(add-to-list 'load-path (concat HOME "bin/"))
(add-to-list 'load-path (concat dotfiles-dir "color-theme"))
(add-to-list 'load-path (concat dotfiles-dir "elpa/"))
(add-to-list 'load-path (concat dotfiles-dir "rcirc"))
;; coffee2-mode development
;; (add-to-list 'load-path "/opt/coffee2-mode/")
;; (require 'coffee2-mode)
;; coffee-mode development
;; (add-to-list 'load-path "/opt/coffee-mode/")
;; (require 'coffee-mode)
;; elixir-mode development
(add-to-list 'load-path (concat HOME "projects/emacs-elixir/"))
(require 'elixir-mode)
(setq coffee-tab-width 4)
(eval-after-load 'coffee-mode
'(define-key coffee-mode-map (kbd "M-r") 'coffee-compile-buffer))
(eval-after-load 'coffee-mode
'(define-key coffee-mode-map (kbd "C-c f") 'coffee-compile-file))
(eval-after-load 'cider-repl-mode
'(define-key cider-repl-mode-map (kbd "M-Up") 'cider-repl-previous-input))
(eval-after-load 'cider-repl-mode
'(define-key cider-repl-mode-map (kbd "M-Down") 'cider-repl-next-input))
(setq flymake-coffee-coffeelint-configuration-file
(concat HOME ".coffeelintrc"))
(add-hook 'coffee-mode-hook 'flymake-coffee-load)
(add-hook 'puppet-mode-hook 'linum-mode)
(add-hook 'puppet-mode-hook 'whitespace-mode)
;; auto-mode
(add-to-list 'auto-mode-alist '("\\.cljs$" . clojure-mode))
(add-to-list 'auto-mode-alist '("Vagrantfile$" . ruby-mode))
(add-to-list 'auto-mode-alist '("\\.pp$" . puppet-mode))
(add-to-list 'auto-mode-alist '("\\.md$" . markdown-mode))
(add-to-list 'auto-mode-alist '("\\.hbs$" . web-mode))
(add-to-list 'auto-mode-alist '("\\.less$" . css-mode))
(add-to-list 'auto-mode-alist '("\\.json$" . json-mode))
(add-to-list 'auto-mode-alist '("\\.coffeelintrc$" . json-mode))
(add-to-list 'auto-mode-alist '("xmobarrc$" . haskell-mode))
(add-to-list 'auto-mode-alist '("\\.ini.*" . conf-unix-mode))
(add-to-list 'auto-mode-alist '("lb\\.\w+\\.conf.*" . nginx-mode))
(add-to-list 'auto-mode-alist '("\\.wsgi$" . python-mode))
(add-to-list 'auto-mode-alist '("\\.erb$" . web-mode))
(add-to-list 'auto-mode-alist '("\\.js$" . web-mode))
(add-to-list 'auto-mode-alist '("\\.jsx$" . web-mode))
(add-to-list 'auto-mode-alist '("\\.axlsx$" . ruby-mode))
;; web-mode
(setq web-mode-content-types-alist
'(("jsx" . "\\.js[x]?\\'")))
(add-hook 'web-mode-hook 'linum-mode)
(add-hook 'web-mode-hook 'whitespace-mode)
(add-hook 'web-mode-hook 'flycheck-mode)
(setq web-mode-code-indent-offset 2)
(setq web-mode-markup-indent-offset 2)
(setq web-mode-attr-indent-offset 2)
(setq web-mode-attr-value-indent-offset 2)
(with-eval-after-load 'flycheck
(with-eval-after-load 'flycheck-flow
(flycheck-add-mode 'javascript-flow-coverage 'web-mode)
(flycheck-add-mode 'javascript-flow 'web-mode))
(flycheck-add-mode 'javascript-eslint 'web-mode))
(setq web-mode-enable-engine-detection t)
;; flycheck
;; use local eslint from node_modules before global
;; http://emacs.stackexchange.com/questions/21205/flycheck-with-file-relative-eslint-executable
(defun my/use-eslint-from-node-modules ()
(let* ((root (locate-dominating-file
(or (buffer-file-name) default-directory)
"node_modules"))
(eslint (and root
(expand-file-name "node_modules/eslint/bin/eslint.js"
root))))
(when (and eslint (file-executable-p eslint))
(setq-local flycheck-javascript-eslint-executable eslint))))
(add-hook 'flycheck-mode-hook #'my/use-eslint-from-node-modules)
;; nginx-mode
(setq nginx-indent-level 2)
;; apache-mode
(setq apache-indent-level 2)
;; tramp
(require 'tramp)
;; tramp path bindings
(add-to-list 'load-path (concat dotfiles-dir "tramp/lisp/"))
(add-to-list 'Info-default-directory-list (concat dotfiles-dir "tramp/info/"))
(set-default 'tramp-default-proxies-alist (quote ((".*" "\\`vagrant\\'" "/ssh:%h:"))))
;; js2
(setq js2-highlight-level 3)
(defun modify-syntax-table-for-jsx ()
(modify-syntax-entry ?< "(>")
(modify-syntax-entry ?> ")<"))
(add-hook 'js2-mode-hook 'modify-syntax-table-for-jsx)
(require 'xscheme)
;; Set browser choice for browse-url
(setq browse-url-browser-function 'browse-url-default-browser
browse-url-generic-program 'browse-url-default-macosx-browser)
(add-hook 'conf-mode-hook 'linum-mode)
(add-hook 'conf-mode-hook 'whitespace-mode)
(defun run-coding-hook ()
(run-hooks 'coding-hook))
(add-hook 'puppet-mode-hook 'auto-complete-mode)
(add-hook 'inferior-python-mode-hook 'auto-complete-mode)
(add-hook 'coding-hook 'auto-complete-mode)
(add-hook 'coding-hook 'highlight-parentheses-mode)
(add-hook 'coding-hook 'linum-mode)
(add-hook 'coding-hook 'whitespace-mode)
(add-hook 'coding-hook 'hs-minor-mode)
(add-hook 'coding-hook 'auto-revert-mode)
(add-hook 'coding-hook 'fic-mode)
(add-hook 'coding-hook 'company-mode)
;; Go hooks
(add-hook 'before-save-hook 'gofmt-before-save)
(add-hook 'go-mode-hook (lambda ()
(local-set-key (kbd "C-c C-r")
'go-remove-unused-imports)))
(add-hook 'go-mode-hook (lambda ()
(local-set-key (kbd "C-c i") 'go-goto-imports)))
;; General coding hooks
(mapc (lambda (mode-hook)
(add-hook mode-hook 'run-coding-hook))
'(apache-mode-hook
c-mode-hook
clojure-mode-hook
coffee-mode-hook
coffee2-mode-hook
csharp-mode-hook
css-mode-hook
elixir-mode-hook
emacs-lisp-mode-hook
go-mode-hook
haskell-mode-hook
html-mode-hook
js2-mode-hook
json-mode-hook
lisp-mode-hook
nginx-mode-hook
python-mode-hook
ruby-mode-hook
rust-mode-hook
shell-script-mode-hook
sql-mode-hook
terraform-mode-hook
yaml-mode-hook))
(eval-after-load 'hideshow
'(define-key hs-minor-mode-map [(mouse-9)] 'hs-mouse-toggle-hiding))
(remove-hook 'html-mode-hook 'highlight-80+-mode)
;; text-mode
(add-hook 'text-mode-hook 'fci-mode)
(add-hook 'text-mode-hook 'auto-fill-mode)
;; clojure-mode
(require 'clojure-mode nil t)
(add-hook 'clojure-mode-hook
(lambda () (local-set-key (kbd "C-c h") 'hs-hide-block)))
(add-hook 'clojure-mode-hook
(lambda () (local-set-key (kbd "C-c s") 'hs-show-block)))
;; ruby-mode
(add-hook 'ruby-mode-hook 'robe-mode)
(add-hook 'ruby-mode-hook 'flymake-ruby-load)
(add-hook 'ruby-mode-hook 'projectile-rails-global-mode)
(if (package-installed-p 'inf-ruby)
(global-set-key (kbd "C-c r r") 'inf-ruby))
(if (package-installed-p 'rvm)
(global-set-key (kbd "C-c r d") 'rvm-activate-corresponding-ruby))
(add-hook 'ruby-mode-hook
(lambda ()
(local-set-key (kbd "TAB") 'company-indent-or-complete-common)))
(add-hook 'inf-ruby-mode-hook 'winner-mode)
;; color-theme
;; C-u C-x = to get font info at point
(require 'color-theme)
(color-theme-initialize)
(setq color-theme-is-global t)
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes/")
;;(load-theme 'tango-dark t)
;;(load-theme 'birds-of-paradise-plus t)
;;(load-theme 'naquadah t)
;;(load-theme 'tsdh-dark t)
;;(load-theme 'underwater t)
;;(load-theme 'sanityinc-tomorrow-eighties t)
;;(load-theme 'sanityinc-tomorrow-bright t)
;;(load-theme 'sanityinc-tomorrow-day t)
;;(color-theme-taming-mr-arneson)
(load-theme 'monokai t)
;;(load-theme 'solarized t)
;; python-mode
(setq python-indent-offset 4)
(add-hook 'python-mode-hook 'flymake-python-pyflakes-load)
(add-hook 'python-mode-hook 'jedi:setup)
(setq jedi:setup-keys t)
(setq jedi:complete-on-dot t)
(require 'ein)
(eval-after-load 'python-mode
'(define-key python-mode-map "\C-c\M-w" 'quote-wrap-line))
;; haskell-mode
(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)
;;Ido config
(require 'ido)
(ido-mode t)
(ido-everywhere t)
;;python.el integration with auto-complete.el
(defvar ac-source-python
'((candidates . (lambda() mapcar
'(lambda (completion)
(first (last (split-string completion "\\." t))))))))
;;load authinfo for all processes handled by rcirc
;;rcirc config
(let ((irc-password-file (expand-file-name "~/.rcirc-authinfo.el")))
(when (file-regular-p irc-password-file)
(load irc-password-file)
(require 'rcirc)
;; (require 'rcirc-controls)
;;rcirc default settings
(setq rcirc-prompt "$> "
rcirc-default-nick "mdeboard"
rcirc-default-user-name "mdeboard"
rcirc-default-full-name "Matt"
rcirc-keywords '("matt" "indiana" "@MattDeBoard")
rcirc-authinfo `(("184.106.93.223" nickserv "mdeboard"
,rcirc-freenode-password)
("mattdeboard.net" bitlbee "mdeboard"
,rcirc-bitlbee-password))
rcirc-server-alist `(("184.106.93.223"
:nick "mdeboard/freenode"
:password ,rcirc-freenode-password
:port 9275)
;; Currently this does not work...
;; ("184.106.93.223"
;; :nick "mdeboard/Mozilla"
;; :port 9276)
("mattdeboard.net"
:nick "mdeboard"
:password ,rcirc-bitlbee-password
:port 6667)))
(add-hook 'rcirc-mode-hook '(lambda () (rcirc-track-minor-mode 1))))
(add-hook 'rcirc-mode-hook 'linum-mode)
)
(defun my-rcirc-complete ()
(interactive)
(let ((current-channel rcirc-target)
(completion (rcirc-complete)))
(concat "@" (rcirc-complete))))
(eval-after-load 'rcirc
'(define-key rcirc-mode-map (kbd "C-c <C-tab>") 'my-rcirc-complete))
;;/reconnect command to re-establish connection w/o opening a new buffer.
(eval-after-load 'rcirc
'(defun-rcirc-command reconnect (arg)
"Reconnect the server process."
(interactive "i")
(unless process
(error "There's no process for this target"))
(let* ((server (car (process-contact process)))
(port (process-contact process :service))
(nick (rcirc-nick process))
channels query-buffers)
(dolist (buf (buffer-list))
(with-current-buffer buf
(when (eq process (rcirc-buffer-process))
(remove-hook 'change-major-mode-hook
'rcirc-change-major-mode-hook)
(if (rcirc-channel-p rcirc-target)
(setq channels (cons rcirc-target channels))
(setq query-buffers (cons buf query-buffers))))))
(delete-process process)
(rcirc-connect server port nick
rcirc-default-user-name
rcirc-default-full-name
channels))))
(eval-after-load 'rcirc
'(defun-rcirc-command clear (arg)
"Clear rcirc buffer."
(interactive "i")
(let ((inhibit-read-only t))
(delete-region
(point-min) rcirc-prompt-start-marker))))
(eval-after-load 'rcirc
'(defun-rcirc-command intense (arg)
"Intensity!"
(interactive "i")
(rcirc-send-message process target "ヽ༼ ಠ益ಠ ༽ノ")))
(eval-after-load 'rcirc
'(defun-rcirc-command ld (arg)
"Look of disapproval"
(interactive "i")
(rcirc-send-message process target "ಠ_ಠ")))
(eval-after-load 'rcirc
'(defun-rcirc-command flip (arg)
"Table flip"
(interactive "i")
(rcirc-send-message process target "(╯°□°)╯︵ ┻━┻")))
(eval-after-load 'rcirc
'(defun-rcirc-command unflip (arg)
"Calm down"
(interactive "i")
(rcirc-send-message process target "┬──┬◡ノ(° -°ノ) chill out bro")))
(eval-after-load 'rcirc
'(defun-rcirc-command yey (arg)
"YAAAAAAAAAAAAAAAAAAAAAAAY"
(interactive "i")
(rcirc-send-message process target "\\(。◕‿◕。)/")))
(eval-after-load 'rcirc
'(defun-rcirc-command dead (arg)
"DEAD"
(interactive "i")
(rcirc-send-message process target "(✖╭╮✖)")))
(eval-after-load 'rcirc
'(defun-rcirc-command hypno (arg)
"Zombie/Hypno"
(interactive "i")
(rcirc-send-message process target "(◎_◎)")))
(eval-after-load 'rcirc
'(defun-rcirc-command commie (arg)
"Hammer & Sickle"
(interactive "i")
(rcirc-send-message process target "(☭_☭)")))
(eval-after-load 'rcirc
'(defun-rcirc-command gangnam (arg)
"Gangnam Style"
(interactive "i")
(rcirc-send-message process target "ヘ( ̄ー ̄ヘ)  Op(ノ ̄ー ̄)ノ Op(〜 ̄▽ ̄)〜 Op〜 ( ̄△ ̄〜) Op(☞゚∀゚)☞ Oppan Gangnam Style")))
(eval-after-load 'rcirc
'(defun-rcirc-command shrug (arg)
"Shrug"
(interactive "i")
(rcirc-send-message process target "¯\_(ツ)_/¯")))
(eval-after-load 'rcirc
'(defun-rcirc-command haha (arg)
"Nelson from the Simpsons"
(interactive "i")
(rcirc-send-message process target
"http://www.youtube.com/watch?v=aIrhVo1WA78")))
(eval-after-load 'rcirc
'(defun-rcirc-command wtf (arg)
"Tom Delonge WTF gif"
(interactive "i")
(rcirc-send-message process target "http://i.imgur.com/QAfZsIX.gif")))
;; Duplicate a line
(defun duplicate-line()
(interactive)
(move-beginning-of-line 1)
(kill-line)
(yank)
(open-line 1)
(next-line 1)
(yank)
)
(defun quote-wrap-line ()
"Wrap marked region with a specified PREFIX and SUFFIX."
(interactive)
(set (make-local-variable 'prefix) (read-from-minibuffer "prefix: "))
(set (make-local-variable 'suffix) (read-from-minibuffer "suffix: "))
(save-excursion (goto-char (region-beginning)) (insert prefix))
(save-excursion (goto-char (region-end)) (insert suffix)))
;; Squirrel backup files (foo.py~) in their own directory.
(setq backup-directory-alist '(("." . "~/.emacs_backups")))
;; This environment variable must be set to `WORKON_HOME' for `virtualenv'
;; to work properly.
(setenv "WORKON_HOME" (concat HOME "Envs"))
(require 'virtualenv)
;; Use virtualenv directory for running Pyflake instead of needing it installed
;; globally.
(eval-after-load 'virtualenv
'(defun virtualenv-python-check (command)
(interactive
(let ((virtualenv-bin-dir (concat (getenv "WORKON_HOME") "/"
virtualenv-workon "/bin/")))
(list (read-string
"Check command: "
(concat virtualenv-bin-dir python-check-command " "
(file-name-nondirectory buffer-file-name))))))
(python-check command)))
;; Run Django's 'shell' management command from within the context of the
;; virtualenv for the current file. Won't work unless you're using it in a
;; Python buffer with virtualenv active.
(eval-after-load 'virtualenv
'(defun django-shell (command)
(interactive
(let ((virtualenv-bin-dir (concat (getenv "WORKON_HOME") "/"
virtualenv-workon "/bin/"))
(manage-cmd
(file-name-nondirectory (concat virtualenv-default-directory
"/manage.py"))))
(list (read-string "Django Shell Command: "
(concat (file-name-nondirectory virtualenv-bin-dir)
"python " manage-cmd " shell")))))
(run-python command nil t)))
;; cider
(add-hook 'cider-mode-hook 'cider-turn-on-eldoc-mode)
(setq nrepl-hide-special-buffers t)
(setq nrepl-log-messages t)
(setq cider-repl-history-file (expand-file-name "~/.emacs.d/cider-history"))
(setq nrepl-buffer-name-show-port t)
(setq cider-prefer-local-resources t)
(setq cider-repl-use-clojure-font-lock t)
;; Rust
(defun rust-compile ()
(interactive)
(compile "cargo build"))
;; (add-hook 'rust-mode-hook
;; (lambda () (local-set-key (kbd "C-c C-c") 'rust-compile)))
(add-hook 'rust-mode-hook #'racer-mode)
(add-hook 'racer-mode-hook #'eldoc-mode)
(add-hook 'racer-mode-hook #'company-mode)
(eval-after-load 'rust-mode
'(define-key rust-mode-map (kbd "TAB") #'company-indent-or-complete-common))
(setq company-tooltip-align-annotations t)
(setq rust-indent-offset 2)
(setq racer-rust-src-path "/opt/rustc-1.11.0/src/")
;;; HACK: This is to allow compatibility between emacs trunk (>= 25.0.5) and
;;; CIDER 0.7.0, which is the last known good version of CIDER I could find.
;;; Please see https://github.com/clojure-emacs/cider/issues/838
;;; for more information.
(defun eldoc-beginning-of-sexp ()
"Move to the beginning of current sexp.
Return the number of nested sexp the point was over or after. "
(let ((parse-sexp-ignore-comments t)
(num-skipped-sexps 0))
(condition-case _
(progn
;; First account for the case the point is directly over a
;; beginning of a nested sexp.
(condition-case _
(let ((p (point)))
(forward-sexp -1)
(forward-sexp 1)
(when (< (point) p)
(setq num-skipped-sexps 1)))
(error))
(while
(let ((p (point)))
(forward-sexp -1)
(when (< (point) p)
(setq num-skipped-sexps (1+ num-skipped-sexps))))))
(error))
num-skipped-sexps))
;; Old CrowdStrike-specific `git-link' setup. Keeping around for reference if I
;; ever need to do this again.
;; (defun git-link-cs-stash (hostname dirname filename branch commit start end)
;; (cl-destructuring-bind (project-name repo-root) (split-string dirname "/")
;; (format "http://stash.cs.sys/projects/%s/repos/%s/browse/%s#%s"
;; project-name
;; repo-root
;; (if (not (equal branch "master"))
;; (format "%s?at=refs/heads/%s" filename branch)
;; filename)
;; (if end
;; (format "%s-%s" start end)
;; (format "%s" start)))))
;; (eval-after-load 'git-link
;; '(add-to-list 'git-link-remote-alist
;; '("cs-stash" git-link-cs-stash)))
(eval-after-load "git-link"
'(progn
(add-to-list 'git-link-remote-alist
'("git.corp.tc" git-link-github))
(add-to-list 'git-link-commit-remote-alist
'("git.corp.tc" git-link-commit-github))))
;; (neotree)
(eval-after-load 'neotree
'(neotree-hidden-file-toggle))
;; Start emacs server process. Access this process by running `emacsclient',
;; i.e. set `EDITOR=emacsclient' in shell config.
(server-start)
;; org-mode
;; (require 'org-gcal)
;; (setq org-gcal-client-id
;; "960898751959-3j6ok4dbkhf7ots5ej6lrurnhrhdrmu3.apps.googleusercontent.com"
;; org-gcal-client-secret "2dxS6Mzwlrmb8ndjHLG8o1k_"
;; org-gcal-file-alist '(("[email protected]"
;; . "~/tasks/calendar.org")))
;; (global-set-key "\C-ca" 'org-agenda)
;; (setq org-agenda-files (list "~/tasks/work.org"
;; "~/tasks/personal.org"
;; "~/tasks/calendar.org"))
(add-hook 'org-mode-hook 'whitespace-mode)
(add-hook 'org-mode-hook 'linum-mode)
(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.
'(browse-url-browser-function (quote browse-url-default-browser))
'(column-number-mode t)
'(comment-multi-line t)
'(comment-style (quote multi-line))
'(custom-safe-themes
(quote
("5a0eee1070a4fc64268f008a4c7abfda32d912118e080e18c3c865ef864d1bea" "1db337246ebc9c083be0d728f8d20913a0f46edc0a00277746ba411c149d7fe5" "938d8c186c4cb9ec4a8d8bc159285e0d0f07bad46edf20aa469a89d0d2a586ea" "0fb6369323495c40b31820ec59167ac4c40773c3b952c264dd8651a3b704f6b5" "8db4b03b9ae654d4a57804286eb3e332725c84d7cdab38463cb6b97d5762ad26" "bb08c73af94ee74453c90422485b29e5643b73b05e8de029a6909af6a3fb3f58" "4cf3221feff536e2b3385209e9b9dc4c2e0818a69a1cdb4b522756bcdf4e00a4" "a041a61c0387c57bb65150f002862ebcfe41135a3e3425268de24200b82d6ec9" "758da0cfc4ecb8447acb866fb3988f4a41cf2b8f9ca28de9b21d9a68ae61b181" "62f3bf67e74b8a79e4a5293ad6ff67e670c2ca5ff6674f84ef573ce54a6a1850" "c4e6fe8f5728a5d5fd0e92538f68c3b4e8b218bcfb5e07d8afff8731cc5f3df0" "55b1828c9c462df8a00eb65aed6522e5aa576e5a2749a265d84bd8b019c84a7e" "253175c48e22ca39a961ed6a1be980890b5ba47220871006e2a500ac20b48b62" "b444ff29051f88cdcc7a9857fc3eaf0899ba9a5b9dcf1c4641df599d08194407" "fbe1cab4ace68fbf4cc326f8cf5fbac4c675bcedbb9e8d95a8c1f3fbb9119619" default)))
'(fci-rule-color "Magenta")
'(fill-column 79)
'(js2-auto-indent-p t)
'(js2-basic-offset 4)
'(js2-indent-on-enter-key t)
'(js3-indent-level 4)
'(js3-indent-tabs-mode nil)
'(magit-branch-arguments (quote ("--track")))
'(magit-diff-arguments (quote ("--ignore-space-change" "--no-ext-diff" "--stat")))
'(magit-push-arguments (quote ("--set-upstream")))
'(nginx-indent-level 2 t)
'(package-selected-packages
(quote
(airline-themes spaceline spaceline-all-the-icons spacemacs-theme powerline tern tern-auto-complete tern-context-coloring ruby-end projectile-ripgrep challenger-deep-theme monokai-alt-theme nimbus-theme nord-theme abyss-theme afternoon-theme ahungry-theme ample-theme ample-zen-theme apropospriate-theme arjen-grey-theme atom-dark-theme atom-one-dark-theme underwater-theme flycheck flycheck-flow npm-mode nginx-mode git-link flymake-ruby rvm company-inf-ruby magit-gh-pulls robe ag projectile-rails yaml-mode scala-mode2 web-mode virtualenv rcirc-notify racer pylint py-autopep8 puppet-mode pg neotree monokai-theme markdown-mode magit lua-mode json-mode jedi-direx igrep highlight-parentheses haskell-mode go-mode go-direx go-autocomplete gist fuzzy flymake-python-pyflakes flymake-coffee fic-mode exec-path-from-shell elixir-mode ein color-theme coffee-mode cider autopair)))
'(safe-local-variable-values
(quote
((flycheck-flow-binary-path . "~/truecar/dealer-frontend/node_modules/.bin/flow")
(python-shell-virtualenv-root . "/Users/mattdeboard/.virtualenvs/dp")
(python-shell-virtualenv-root concat HOME "/.virtualenvs/dp")
(python-shell-virtualenv-root . "/Users/mattdeboard/Envs/dp")
(python-shell-virtualenv-path . "/Users/mattdeboard/Envs/dp")
(python-shell-virtualenv-path . "/Users/mdeboard/Envs/dp")
(web-mode\.engines-alist quote
(("reactjs" . "\\.js$")))
(python-shell-virtualenv-path . "/Users/mdeboard/Envs/eyrie")
(js-indent-level . 2)
(python-mode
(jedi:environment-virtualenv
(quote
("virtualenv" "--system-site-packages" "--quiet" "--python" "/home/matt/Envs/api/bin/python")))
(jedi:environment-root . "api"))
(python-environment-directory . "/home/matt/Envs")
(jedi:environment-root . "~/Envs/api")
(web-mode-markup-indent-offset . 4)
(web-mode-code-indent-offset . 4)
(web-mode-indent-style . 4)
(engine . reactjs)
(setq-local js3-indent-tabs-mode . t)
(setq js3-indent-tabs-mode . t)
(setq-default indent-tabs-mode . t)
(setq indent-tabs-mode . t)
(ein:use-auto-complete . t)
(ein:use-auto-complete-superpack . t)
(python-environment-directory . "~/Envs")
(jedi:environment-virtualenv
("virtualenv" "--system-site-packages" "--quiet" "--python" "/home/matt/Envs/api/bin/python"))
(jedi:environment-root . "api")
(jedi:environment-virtualenv
(quote
("virtualenv" "--system-site-packages" "--quiet" "--python" "/home/matt/Envs/api/bin/python")))
(jedi:environment-virtualenv
(quote
("virtualenv" "--system-site-packages" "--quiet" "--python" "/home/matt/Envs/api/bin/python"))
(jedi:environment-root . "api"))
(jedi:environment-root . "/home/matt/Envs/api")
(whitespace-action)
(python-shell-completion-module-string-cod . "';'.join(module_completion('''%s'''))
")
(python-shell-completion-string-code . "';'.join(get_ipython().Completer.all_completions('''%s'''))
")
(python-shell-completion-module-string-code . "';'.join(module_completion('''%s'''))
")
(python-shell-completion-setup-code . "from IPython.core.completerlib import module_completion")
(python-shell-interpreter-args . "")
(python-shell-interpreter . "ipython"))))
'(tab-width 4)
'(web-mode-code-indent-offset 2)
'(web-mode-markup-indent-offset 2))
'(python-indent-offset 4)
(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.
)
(put 'downcase-region 'disabled nil)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment