Skip to content

Instantly share code, notes, and snippets.

@mdsib
Created January 16, 2017 01:28
Show Gist options
  • Save mdsib/a148a8074f79b3cda3154f7fc43d8a1a to your computer and use it in GitHub Desktop.
Save mdsib/a148a8074f79b3cda3154f7fc43d8a1a to your computer and use it in GitHub Desktop.
(setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/")
("marmalade" . "https://marmalade-repo.org/packages/")
("melpa" . "https://melpa.org/packages/")))
;; Activating stuff
(which-key-mode 1)
(ivy-mode 1)
(electric-pair-mode 1)
(evil-mode 1)
(company-mode 1)
(setq org-src-fontify-natively t)
(org-babel-do-load-languages
'org-babel-load-languages
'((js . t)))
;; which-key https://github.com/justbur/emacs-which-key
(setq which-key-sort-order 'which-key-description-order)
;; shamelessly stolen from ivy's example config: https://github.com/abo-abo/swiper
(setq ivy-use-virtual-buffers t)
(global-set-key "\C-s" 'swiper)
(global-set-key (kbd "C-c C-r") 'ivy-resume)
(global-set-key (kbd "<f6>") 'ivy-resume)
(global-set-key (kbd "M-x") 'counsel-M-x)
(global-set-key (kbd "C-x C-f") 'counsel-find-file)
(global-set-key (kbd "<f1> f") 'counsel-describe-function)
(global-set-key (kbd "<f1> v") 'counsel-describe-variable)
(global-set-key (kbd "<f1> l") 'counsel-find-library)
(global-set-key (kbd "<f2> i") 'counsel-info-lookup-symbol)
(global-set-key (kbd "<f2> u") 'counsel-unicode-char)
(global-set-key (kbd "C-c g") 'counsel-git)
(global-set-key (kbd "C-c j") 'counsel-git-grep)
(global-set-key (kbd "C-c k") 'counsel-ag)
(global-set-key (kbd "C-x l") 'counsel-locate)
(global-set-key (kbd "C-S-o") 'counsel-rhythmbox)
(define-key read-expression-map (kbd "C-r") 'counsel-expression-history)
;; http://oremacs.com/swiper/#ivy--regex-fuzzy
;; (setq ivy-re-builders-alist
;; '((t . ivy--regex-fuzzy)))
;; from https://github.com/milkypostman/powerline
(powerline-default-theme)
;; https://melpa.org/#/js2-mode told me to do this
(add-to-list 'auto-mode-alist '("\\.jsx?\\'" . js2-jsx-mode))
(add-to-list 'interpreter-mode-alist '("node" . js2-jsx-mode))
;; from http://company-mode.github.io/
(add-hook 'after-init-hook 'global-company-mode)
;; from https://github.com/iquiw/company-ghc/issues/12
(with-eval-after-load 'company
(add-to-list 'company-backends 'company-tern))
(add-hook 'neotree-mode-hook
(lambda ()
(define-key evil-normal-state-local-map (kbd "TAB") 'neotree-enter)
(define-key evil-normal-state-local-map (kbd "SPC") 'neotree-enter)
(define-key evil-normal-state-local-map (kbd "q") 'neotree-hide)
(define-key evil-normal-state-local-map (kbd "RET") 'neotree-enter)))
(add-hook 'org-mode-hook 'org-bullets-mode)
(color-theme-initialize)
(color-theme-charcoal-black)
(require 'airline-themes)
(load-theme 'airline-cool)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment