Skip to content

Instantly share code, notes, and snippets.

@ga2arch
Created March 8, 2017 10:45
Show Gist options
  • Save ga2arch/bd9813cbf71cfe23f1434435ea0f9b32 to your computer and use it in GitHub Desktop.
Save ga2arch/bd9813cbf71cfe23f1434435ea0f9b32 to your computer and use it in GitHub Desktop.
(setq inhibit-startup-message t)
(require 'package)
(setq package-enable-at-startup nil)
(setq package-archives
'(("melpa" . "https://melpa.org/packages/")
("gnu" . "https://elpa.gnu.org/packages/")
("org" . "http://orgmode.org/elpa/")
("emacs-pe" . "https://emacs-pe.github.io/packages/")))
(package-initialize)
;; Bootstrap `use-package'
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
(use-package try
:ensure t)
(use-package which-key
:ensure t
:config
(which-key-mode))
;; General
(prefer-coding-system 'utf-8)
(bind-key "C-x p" 'pop-to-mark-command)
(setq set-mark-command-repeat-pop t)
(delete-selection-mode 1)
(use-package persistent-scratch
:ensure t
:config
(persistent-scratch-setup-default))
;; Iedit
(use-package iedit
:ensure t
:config)
;; Theme
(use-package naquadah-theme
:ensure t
:config
(load-theme 'naquadah t))
;; (set-face-attribute 'default nil :height 94)
(set-face-attribute 'fringe nil :background "#2d2d2d")
(set-face-attribute 'default nil :family "Source Code Pro")
(set-face-attribute 'font-lock-comment-face nil :slant 'italic)
(set-face-attribute 'font-lock-comment-face nil :weight 'semibold)
(set-fontset-font "fontset-default" 'unicode "DejaVu Sans Mono for Powerline")
;; Visual
(scroll-bar-mode -1)
(tool-bar-mode -1)
(setq inhibit-startup-message t)
(setq inhibit-splash-screen t)
(setq visible-bell 0)
(setq ring-bell-function 'ignore)
(global-prettify-symbols-mode +1)
(global-hl-line-mode 1)
(make-variable-buffer-local 'global-hl-line-mode)
(set-face-attribute 'vertical-border nil :foreground (face-attribute 'fringe :background))
;; Generic
(defalias 'yes-or-no-p 'y-or-n-p)
(setq mouse-yank-at-point t)
(setq-default fill-column 79)
;; Tramp
(setq tramp-default-method "ssh")
;; Autosave
(defvar backup-dir (expand-file-name "~/.emacs.d/emacs_backup/"))
(defvar autosave-dir (expand-file-name "~/.emacs.d/autosave/"))
(setq backup-directory-alist (list (cons ".*" backup-dir)))
(setq auto-save-list-file-prefix autosave-dir)
(setq auto-save-file-name-transforms `((".*" ,autosave-dir t)))
(setq tramp-backup-directory-alist backup-directory-alist)
(setq tramp-auto-save-directory autosave-dir)
;; Spaces/Tabs
(setq-default indent-tabs-mode nil)
(setq-default tab-width 2)
(setq-default tab-stop-list (number-sequence 2 120 2))
(setq c-basic-indent 2)
(setq sh-basic-offset 2)
;; Parentheses
(show-paren-mode 1)
(setq show-paren-delay 0)
(use-package highlight-parentheses
:ensure t)
(define-globalized-minor-mode global-highlight-parentheses-mode
highlight-parentheses-mode
(lambda ()
(highlight-parentheses-mode t)))
(global-highlight-parentheses-mode t)
(use-package rainbow-delimiters
:ensure t
:config
(set-face-attribute 'rainbow-delimiters-depth-1-face nil
:foreground "#78c5d6")
(set-face-attribute 'rainbow-delimiters-depth-2-face nil
:foreground "#bf62a6")
(set-face-attribute 'rainbow-delimiters-depth-3-face nil
:foreground "#459ba8")
(set-face-attribute 'rainbow-delimiters-depth-4-face nil
:foreground "#e868a2")
(set-face-attribute 'rainbow-delimiters-depth-5-face nil
:foreground "#79c267")
(set-face-attribute 'rainbow-delimiters-depth-6-face nil
:foreground "#f28c33")
(set-face-attribute 'rainbow-delimiters-depth-7-face nil
:foreground "#c5d647")
(set-face-attribute 'rainbow-delimiters-depth-8-face nil
:foreground "#f5d63d")
(set-face-attribute 'rainbow-delimiters-depth-9-face nil
:foreground "#78c5d6"))
(add-hook 'emacs-lisp-mode-hook 'rainbow-delimiters-mode)
(add-hook 'lisp-mode-hook 'rainbow-delimiters-mode)
(electric-pair-mode 1)
;; Paredit
(use-package paredit
:ensure t
:config
(define-key paredit-mode-map (kbd "C-j") nil)
(autoload 'enable-paredit-mode "paredit" "Turn on pseudo-structural editing of Lisp code." t)
(defun turn-on-paredit ()
(enable-paredit-mode))
(add-hook 'emacs-lisp-mode-hook 'turn-on-paredit)
(add-hook 'lisp-mode-hook 'turn-on-paredit))
;; Windows
(use-package framemove
:ensure t
:config
(setq framemove-hook-into-windmove t))
(windmove-default-keybindings)
;; Helm
(use-package helm-config
:ensure helm
:demand t ;; demand it be loaded!
:diminish helm-mode
:bind
(("C-M-z" . helm-resume)
("C-x C-f" . helm-find-files)
("C-x C-r" . helm-mini)
("C-x o" . helm-occur)
("M-y" . helm-show-kill-ring)
("C-h a" . helm-apropos)
("C-h m" . helm-man-woman)
("C-h SPC" . helm-all-mark-rings)
("C-x C-i" . helm-semantic-or-imenu)
("M-x" . helm-M-x)
("C-x C-b" . helm-buffers-list)
("C-x C-r" . helm-mini)
("C-x b" . helm-mini)
("C-h t" . helm-world-time))
:config
(use-package helm-files
:config (setq helm-ff-file-compressed-list '("gz" "bz2" "zip" "tgz" "xz" "txz")))
(use-package helm-buffers
:config
(add-to-list 'helm-boring-buffer-regexp-list "^TAGS$")
(add-to-list 'helm-boring-buffer-regexp-list "git-gutter:diff"))
(use-package helm-mode
:diminish helm-mode
:init
(add-hook 'after-init-hook #'helm-mode)
(add-hook 'after-init-hook #'helm-autoresize-mode)
(add-hook 'after-init-hook #'helm-adaptive-mode)
(add-hook 'after-init-hook #'helm-push-mark-mode)
(add-hook 'after-init-hook #'helm-popup-tip-mode))
(use-package helm-sys
:init (add-hook 'after-init-hook #'helm-top-poll-mode))
(use-package helm-grep
:config
(setq helm-grep-truncate-lines nil)
(define-key helm-grep-mode-map (kbd "<return>") 'helm-grep-mode-jump-other-window)
(define-key helm-grep-mode-map (kbd "n") 'helm-grep-mode-jump-other-window-forward)
(define-key helm-grep-mode-map (kbd "p") 'helm-grep-mode-jump-other-window-backward))
(use-package helm-man)
(use-package helm-misc)
(use-package helm-elisp)
(use-package helm-imenu)
(use-package helm-semantic)
(use-package helm-ring)
(use-package smex :ensure t)
(use-package helm-smex :ensure t)
(use-package helm-bookmark
:bind ("C-x M-b" . helm-bookmarks)
:init (use-package bookmark+ :ensure t))
(use-package helm-projectile
:ensure t
:bind (:map projectile-command-map
("b" . helm-projectile-switch-to-buffer)
("d" . helm-projectile-find-dir)
("f" . helm-projectile-find-file)
("p" . helm-projectile-switch-project)
("s s" . helm-projectile-ag))
:init
(helm-projectile-on)
(helm-delete-action-from-source
"Grep in projects `C-s'"
helm-source-projectile-projects)
(helm-add-action-to-source
"Ag in project C-s'"
'helm-do-ag helm-source-projectile-projects)
(bind-key "C-s" (defun helm-projectile-do-ag ()
(interactive)
(helm-exit-and-execute-action #'helm-do-ag))
helm-projectile-projects-map)
(global-set-key (kbd "C-x f") #'helm-projectile-find-file))
(global-set-key (kbd "C-c h") 'helm-command-prefix)
(global-unset-key (kbd "C-x c"))
;; Shows helm input in the header instead of the footer
(setq helm-echo-input-in-header-line t)
(defun helm-hide-minibuffer-maybe ()
"Hide minibuffer in Helm session if we use the header line as input field."
(when (with-helm-buffer helm-echo-input-in-header-line)
(let ((ov (make-overlay (point-min) (point-max) nil nil t)))
(overlay-put ov 'window (selected-window))
(overlay-put ov 'face
(let ((bg-color (face-background 'default nil)))
`(:background ,bg-color :foreground ,bg-color)))
(setq-local cursor-type nil))))
(add-hook 'helm-minibuffer-set-up-hook #'helm-hide-minibuffer-maybe)
(setq helm-grep-default-command
"grep -a -d skip %e -n%cH -e %p %f"
;; may be overridden if 'ggrep' is in path (see below)
helm-grep-default-recurse-command
"grep -a -d recurse %e -n%cH -e %p %f"
;; use CURL, not url-retrieve-synchronously
helm-net-prefer-curl t
;; be idle for this many seconds, before updating in delayed sources.
helm-input-idle-delay 0.05
;; wider buffer name in helm-buffers-list
helm-buffer-max-length 28 ;; default is 20
;; instead of "..." use a smaller unicode ellipsis
helm-buffers-end-truncated-string "…"
;; open helm buffer in another window
;;helm-split-window-default-side 'other
;; set to nil and use <C-backspace> to toggle it in helm-find-files
helm-ff-auto-update-initial-value nil
;; if I change the resplit state, re-use my settings
;; helm-reuse-last-window-split-state t
;; don't delete windows to always have 2
helm-always-two-windows nil
;; open helm buffer inside current window, don't occupy whole other window
helm-split-window-in-side-p t
;; fit buffer to width automatically
;; fit-window-to-buffer-horizontally 1
;; don't check if the file exists on remote files
helm-buffer-skip-remote-checking t
;; limit the number of displayed canidates
helm-candidate-number-limit 150
;; don't use recentf stuff in helm-ff, I use C-x C-r for this
helm-ff-file-name-history-use-recentf nil
;; move to end or beginning of source when reaching top or bottom
;; of source
helm-move-to-line-cycle-in-source t
;; don't display the header line
helm-display-header-line nil
;; be semi-verbose for helm tramp messages
helm-tramp-verbose 3
;; fuzzy matching
helm-recentf-fuzzy-match t
helm-locate-fuzzy-match nil ;; locate fuzzy is worthless
helm-M-x-fuzzy-match t
helm-buffers-fuzzy-matching t
helm-semantic-fuzzy-match t
helm-gtags-fuzzy-match t
helm-imenu-fuzzy-match t
helm-apropos-fuzzy-match nil
helm-lisp-fuzzy-completion nil
helm-completion-in-region-fuzzy-match nil
helm-autoresize-mode 0
helm-autoresize-min-height 30
helm-autoresize-max-height 30
;; Here are the things helm-mini shows, I add `helm-source-bookmarks'
;; here to the regular default list
helm-mini-default-sources '(helm-source-buffers-list
helm-source-recentf
helm-source-bookmarks
helm-source-buffer-not-found))
;; Files that helm should know how to open
(setq helm-external-programs-associations
'(("avi" . "vlc")
("part" . "vlc")
("mkv" . "vlc")
("webm" . "vlc")
("mp4" . "vlc")))
;; List of times to show in helm-world-time
(setq display-time-world-list '(("PST8PDT" "Los Altos")
("America/Denver" "Denver")
("EST5EDT" "Boston")
("UTC" "UTC")
("Europe/London" "London")
("Europe/Amsterdam" "Amsterdam")
("Asia/Bangkok" "Bangkok")
("Asia/Tokyo" "Tokyo")
("Australia/Sydney" "Sydney")))
;; rebind tab to do persistent action
(define-key helm-map (kbd "<tab>") 'helm-execute-persistent-action)
;; make TAB works in terminal
(define-key helm-map (kbd "C-i") 'helm-execute-persistent-action)
;; list actions using C-z
(define-key helm-map (kbd "C-z") 'helm-select-action)
(define-key helm-map (kbd "C-p") 'helm-previous-line)
(define-key helm-map (kbd "C-n") 'helm-next-line)
(define-key helm-map (kbd "C-M-n") 'helm-next-source)
(define-key helm-map (kbd "C-M-p") 'helm-previous-source)
(define-key helm-map (kbd "M-N") 'helm-next-source)
(define-key helm-map (kbd "M-P") 'helm-previous-source)
;; The normal binding is C-c h M-g s which is insane
(global-set-key (kbd "C-c h g") 'helm-do-grep)
(global-set-key (kbd "C-c h a") 'helm-do-ag)
(when (executable-find "curl")
(setq helm-google-suggest-use-curl-p t))
;; ggrep is gnu grep on OSX
(when (executable-find "ggrep")
(setq helm-grep-default-command
"ggrep -a -d skip %e -n%cH -e %p %f"
helm-grep-default-recurse-command
"ggrep -a -d recurse %e -n%cH -e %p %f"))
;; helm-mini instead of recentf
(define-key 'help-command (kbd "C-f") 'helm-apropos)
(define-key 'help-command (kbd "r") 'helm-info-emacs)
(defvar helm-httpstatus-source
'((name . "HTTP STATUS")
(candidates . (("100 Continue") ("101 Switching Protocols")
("102 Processing") ("200 OK")
("201 Created") ("202 Accepted")
("203 Non-Authoritative Information") ("204 No Content")
("205 Reset Content") ("206 Partial Content")
("207 Multi-Status") ("208 Already Reported")
("300 Multiple Choices") ("301 Moved Permanently")
("302 Found") ("303 See Other")
("304 Not Modified") ("305 Use Proxy")
("307 Temporary Redirect") ("400 Bad Request")
("401 Unauthorized") ("402 Payment Required")
("403 Forbidden") ("404 Not Found")
("405 Method Not Allowed") ("406 Not Acceptable")
("407 Proxy Authentication Required") ("408 Request Timeout")
("409 Conflict") ("410 Gone")
("411 Length Required") ("412 Precondition Failed")
("413 Request Entity Too Large")
("414 Request-URI Too Large")
("415 Unsupported Media Type")
("416 Request Range Not Satisfiable")
("417 Expectation Failed") ("418 I'm a teapot")
("421 Misdirected Request")
("422 Unprocessable Entity") ("423 Locked")
("424 Failed Dependency") ("425 No code")
("426 Upgrade Required") ("428 Precondition Required")
("429 Too Many Requests")
("431 Request Header Fields Too Large")
("449 Retry with") ("500 Internal Server Error")
("501 Not Implemented") ("502 Bad Gateway")
("503 Service Unavailable") ("504 Gateway Timeout")
("505 HTTP Version Not Supported")
("506 Variant Also Negotiates")
("507 Insufficient Storage") ("509 Bandwidth Limit Exceeded")
("510 Not Extended")
("511 Network Authentication Required")))
(action . message)))
(defvar helm-clj-http-source
'((name . "clj-http options")
(candidates
.
((":accept - keyword for content type to accept")
(":as - output coercion: :json, :json-string-keys, :clojure, :stream, :auto or string")
(":basic-auth - string or vector of basic auth creds")
(":body - body of request")
(":body-encoding - encoding type for body string")
(":client-params - apache http client params")
(":coerce - when to coerce response body: :always, :unexceptional, :exceptional")
(":conn-timeout - timeout for connection")
(":connection-manager - connection pooling manager")
(":content-type - content-type for request")
(":cookie-store - CookieStore object to store/retrieve cookies")
(":cookies - map of cookie name to cookie map")
(":debug - boolean to print info to stdout")
(":debug-body - boolean to print body debug info to stdout")
(":decode-body-headers - automatically decode body headers")
(":decompress-body - whether to decompress body automatically")
(":digest-auth - vector of digest authentication")
(":follow-redirects - boolean whether to follow HTTP redirects")
(":form-params - map of form parameters to send")
(":headers - map of headers")
(":ignore-unknown-host? - whether to ignore inability to resolve host")
(":insecure? - boolean whether to accept invalid SSL certs")
(":json-opts - map of json options to be used for form params")
(":keystore - file path to SSL keystore")
(":keystore-pass - password for keystore")
(":keystore-type - type of SSL keystore")
(":length - manually specified length of body")
(":max-redirects - maximum number of redirects to follow")
(":multipart - vector of multipart options")
(":oauth-token - oauth token")
(":proxy-host - hostname of proxy server")
(":proxy-ignore-hosts - set of hosts to ignore for proxy")
(":proxy-post - port for proxy server")
(":query-params - map of query parameters")
(":raw-headers - boolean whether to return raw headers with response")
(":response-interceptor - function called for each redirect")
(":retry-handler - function to handle HTTP retries on IOException")
(":save-request? - boolean to return original request with response")
(":socket-timeout - timeout for establishing socket")
(":throw-entire-message? - whether to throw the entire response on errors")
(":throw-exceptions - boolean whether to throw exceptions on 5xx & 4xx")
(":trust-store - file path to trust store")
(":trust-store-pass - password for trust store")
(":trust-store-type - type of trust store")))
(action . message)))
(defun helm-httpstatus ()
(interactive)
(helm-other-buffer '(helm-httpstatus-source) "*helm httpstatus*"))
(defun helm-clj-http ()
(interactive)
(helm-other-buffer '(helm-clj-http-source) "*helm clj-http flags*")))
(use-package helm-ls-git
:ensure t
:bind ("C-x C-d" . helm-browse-project))
(use-package helm-swoop
:ensure t
:bind (("M-i" . helm-swoop)
("M-I" . helm-swoop-back-to-last-point)
("C-c M-i" . helm-multi-swoop))
:config
;; When doing isearch, hand the word over to helm-swoop
(define-key isearch-mode-map (kbd "M-i") 'helm-swoop-from-isearch)
;; From helm-swoop to helm-multi-swoop-all
(define-key helm-swoop-map (kbd "M-i") 'helm-multi-swoop-all-from-helm-swoop)
;; Save buffer when helm-multi-swoop-edit complete
(setq helm-multi-swoop-edit-save t
;; If this value is t, split window inside the current window
helm-swoop-split-with-multiple-windows t
;; Split direcion. 'split-window-vertically or 'split-window-horizontally
helm-swoop-split-direction 'split-window-vertically
;; If nil, you can slightly boost invoke speed in exchange for text color
helm-swoop-speed-or-color nil))
(use-package helm-descbinds
:ensure t
:bind ("C-h b" . helm-descbinds)
:init (fset 'describe-bindings 'helm-descbinds))
;; Projectile
(use-package projectile
:ensure t
:defer 5
:commands projectile-global-mode
:diminish projectile-mode
:init (add-hook 'after-init-hook #'projectile-global-mode)
:config
(bind-key "C-c p b" #'projectile-switch-to-buffer #'projectile-command-map)
(bind-key "C-c p K" #'projectile-kill-buffers #'projectile-command-map)
;; global ignores
(add-to-list 'projectile-globally-ignored-files ".tern-port")
(add-to-list 'projectile-globally-ignored-files "GTAGS")
(add-to-list 'projectile-globally-ignored-files "GPATH")
(add-to-list 'projectile-globally-ignored-files "GRTAGS")
(add-to-list 'projectile-globally-ignored-files "GSYMS")
(add-to-list 'projectile-globally-ignored-files ".DS_Store")
;; always ignore .class files
(add-to-list 'projectile-globally-ignored-file-suffixes ".class")
(use-package helm-projectile
:ensure t
:init
(use-package helm-ag
:ensure t)
(use-package grep) ;; required for helm-ag to work properly
(setq projectile-completion-system 'helm)
;; no fuzziness for projectile-helm
(setq helm-projectile-fuzzy-match nil)
(helm-projectile-on)
:config
;; Add multi-compile to the mix for projects
(defun helm-projectile-multi-compile-project (dir)
"A Helm action to invoke multi-compile on a project.
`dir' is the project root."
(let ((default-directory dir))
(multi-compile-run)))
;; Add new projectile binding for multi-compile
(helm-projectile-define-key helm-projectile-projects-map
(kbd "M-m") #'helm-projectile-multi-compile-project)))
;; Scrolling
(use-package smooth-scroll
:config
(smooth-scroll-mode 1)
(setq smooth-scroll/vscroll-step-size 5))
;; Autocomplete
(use-package auto-complete
:ensure t
:init
(progn
(ac-config-default)
(global-auto-complete-mode t)
))
;; Magit
(use-package magit
:ensure t
:bind
("C-x g" . magit-status)
:config
(setq magit-push-always-verify nil))
(use-package magit-gitflow
:ensure t
:config
(setq magit-gitflow-popup-key "%")
(add-hook 'magit-mode-hook 'turn-on-magit-gitflow))
;; Slime
(use-package slime
:ensure t
:bind (:map slime-mode-map
("C-c C-b" . slime-eval-buffer))
:config
(setq inferior-lisp-program "sbcl")
(setq slime-contribs '(slime-fancy)))
;; Ace jump
(use-package ace-jump-mode
:ensure t
:bind ("C-." . ace-jump-mode))
;; Hi-lock
(use-package hi-lock
:ensure
:bind (("M-o l" . highlight-lines-matching-regexp)
("M-o r" . highlight-regexp)
("M-o w" . highlight-phrase)))
;; Expand Region
(use-package expand-region
:ensure t
:config
(global-set-key (kbd "C-=") 'er/expand-region))
;; Rest client
(use-package restclient
:mode (("\\.http" . restclient-mode))
:ensure t
:bind ("<s-return>" . restclient-http-send-current-stay-in-window))
;; Shell pop
(use-package shell-pop
:ensure t
:config
(custom-set-variables
'(shell-pop-shell-type
'("ansi-term" "*ansi-term*" (lambda nil (ansi-term shell-pop-term-shell))))
'(shell-pop-term-shell "/bin/zsh")
'(shell-pop-universal-key "C-t")
'(shell-pop-window-size 30)
'(shell-pop-full-span t)
'(shell-pop-window-position "bottom")))
;; Whitespace
(use-package whitespace
:ensure t
:config
(add-hook 'before-save-hook 'delete-trailing-whitespace))
;; Bookmark+
(use-package bookmark+
:ensure t)
;; Undo Tree
(use-package undo-tree
:ensure t
:diminish undo-tree-mode
:config
(global-undo-tree-mode))
;; Ace Window
(use-package ace-window
:ensure t
:bind ("M-l" . ace-window))
;; Multiple Cursors
(use-package multiple-cursors
:ensure t
:bind
(("C-c m t" . mc/mark-all-like-this)
("C-c m m" . mc/mark-all-like-this-dwim)
("C-c m l" . mc/edit-lines)
("C-c m e" . mc/edit-ends-of-lines)
("C-c m a" . mc/edit-beginnings-of-lines)
("C-c m n" . mc/mark-next-like-this)
("C-c m p" . mc/mark-previous-like-this)
("C-c m s" . mc/mark-sgml-tag-pair)
("C-c m d" . mc/mark-all-like-this-in-defun)))
;; Tea time
(use-package tea-time
:ensure t
:config
(require 'tea-time))
;; Org
(use-package ob-restclient
:ensure t)
(use-package ob-http
:ensure t)
(use-package org
:mode (("\\.org$" . org-mode))
:ensure org-plus-contrib
:config
(add-to-list 'org-structure-template-alist '("d" "** %t"))
(setq-default
org-return-follows-link t
org-image-actual-width '(400)
org-highlight-latex-and-related '(latex script entities))
(setq
org-src-fontify-natively t
org-src-tab-acts-natively t
org-startup-indented t)
(setq org-latex-listings 'minted)
(setq org-html-htmlize-output-type 'css)
(require 'ob-plantuml)
(require 'ob-restclient)
(require 'ob-http)
(org-babel-do-load-languages
'org-babel-load-languages
'(
(emacs-lisp . t)
(js . t)
(shell . t)
(plantuml . t)
(restclient . t)
(http . t)))
(setq org-confirm-babel-evaluate nil)
(setq org-export-babel-evaluate nil) ;; can be bad for long simulations
(add-hook 'org-babel-after-execute-hook 'org-display-inline-images 'append)
(setq org-plantuml-jar-path "/Users/ga2arch/plantuml.jar"))
(use-package org-bullets
:ensure t
:config
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))))
;; KeyChord
(use-package key-chord
:ensure t
:config
(setq key-chord-one-key-delay 0.16)
(key-chord-mode 1)
(key-chord-define-global "kk" 'kill-sexp))
;; Purescript
(use-package purescript-mode ; PureScript mode
:ensure t
:pin emacs-pe)
(use-package psci ; psci integration
:ensure t
:pin emacs-pe)
(use-package psc-ide
:ensure t
:config
(require 'psc-ide)
(add-hook 'purescript-mode-hook
(lambda ()
(psc-ide-mode)
(company-mode)
(flycheck-mode)
(turn-on-purescript-indentation))))
;; Haskell
(use-package intero
:ensure t
:config
(add-hook 'haskell-mode-hook 'intero-mode))
(use-package buffer-move
:ensure t
:config
(global-set-key (kbd "<s-up>") 'buf-move-up)
(global-set-key (kbd "<s-down>") 'buf-move-down)
(global-set-key (kbd "<s-left>") 'buf-move-left)
(global-set-key (kbd "<s-right>") 'buf-move-right))
;; Clojure
(use-package smartparens
:ensure t)
(use-package cider
:ensure t
:commands (cider cider-connect cider-jack-in)
:init
(setq cider-auto-select-error-buffer t
cider-repl-pop-to-buffer-on-connect nil
cider-repl-use-clojure-font-lock t
cider-repl-wrap-history t
cider-repl-history-size 1000
cider-show-error-buffer t
nrepl-hide-special-buffers t
nrepl-popup-stacktraces nil)
(add-hook 'cider-repl-mode-hook 'rainbow-delimiters-mode)
(add-hook 'cider-repl-mode-hook 'smartparens-strict-mode)
(add-hook 'cider-repl-mode-hook 'subword-mode)
(add-hook 'cider-test-report-mode 'jcf-soft-wrap)
;; nrepl isn't based on comint
(add-hook 'cider-repl-mode-hook
(lambda () (setq show-trailing-whitespace nil)))
:config
(use-package slamhound))
(use-package ac-cider
:ensure t
:config
(add-hook 'cider-mode-hook 'ac-flyspell-workaround)
(add-hook 'cider-mode-hook 'ac-cider-setup)
(add-hook 'cider-repl-mode-hook 'ac-cider-setup)
(eval-after-load "auto-complete"
'(progn
(add-to-list 'ac-modes 'cider-mode)
(add-to-list 'ac-modes 'cider-repl-mode))))
;; Python
(use-package python
:ensure t
:config
(setq py-python-command "ipython")
(setq python-shell-interpreter "ipython"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment