Skip to content

Updated Brave Clojure Emacs Configuration for August 2018. #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,4 @@ Emacs has decent support for CSS, HTML, JS, and many other file types out of the
* Adds support for YAML and SCSS using the yaml-mode and scss-mode packages

In general, if you want to add support for a language then you should be able to find good instructions for it through Google. Most of the time, you'll just need to install the "x-lang-mode" package for it.

10 changes: 0 additions & 10 deletions customizations/editing.el
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@
(comment-or-uncomment-region (line-beginning-position) (line-end-position)))
(global-set-key (kbd "C-;") 'toggle-comment-on-line)

;; yay rainbows!
(global-rainbow-delimiters-mode t)

;; use 2 spaces for tabs
(defun die-tabs ()
(interactive)
Expand All @@ -62,11 +59,4 @@
(untabify (region-beginning) (region-end))
(keyboard-quit))

;; fix weird os x kill error
(defun ns-get-pasteboard ()
"Returns the value of the pasteboard, or nil for unsupported formats."
(condition-case nil
(ns-get-selection-internal 'CLIPBOARD)
(quit nil)))

(setq electric-indent-mode nil)
4 changes: 2 additions & 2 deletions customizations/elisp-editing.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
(autoload 'enable-paredit-mode "paredit" "Turn on pseudo-structural editing of Lisp code." t)
(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 '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)
Expand All @@ -12,4 +12,4 @@
;; http://www.emacswiki.org/emacs/ElDoc
(add-hook 'emacs-lisp-mode-hook 'turn-on-eldoc-mode)
(add-hook 'lisp-interaction-mode-hook 'turn-on-eldoc-mode)
(add-hook 'ielm-mode-hook 'turn-on-eldoc-mode)
;; (add-hook 'ielm-mode-hook 'turn-on-eldoc-mode)
22 changes: 15 additions & 7 deletions customizations/navigation.el
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,21 @@
(recentf-mode 1)
(setq recentf-max-menu-items 40)

(require 'ido-completing-read+)

;; ido-mode allows you to more easily navigate choices. For example,
;; when you want to switch buffers, ido presents you with a list
;; of buffers in the the mini-buffer. As you start to type a buffer's
;; name, ido will narrow down the list of buffers to match the text
;; you've typed in
;; http://www.emacswiki.org/emacs/InteractivelyDoThings
(ido-mode t)

;; This enables ido in all contexts where it could be useful, not just
;; for selecting buffer and file names
(ido-ubiquitous-mode 1)

(ido-mode 1)
(ido-everywhere 1)

;; This allows partial matches, e.g. "tl" will match "Tyrion Lannister"
(setq ido-enable-flex-matching t)
Expand All @@ -42,20 +49,21 @@
;; open now
(setq ido-use-virtual-buffers t)

;; This enables ido in all contexts where it could be useful, not just
;; for selecting buffer and file names
(ido-ubiquitous-mode 1)

;; Shows a list of buffers
(global-set-key (kbd "C-x C-b") 'ibuffer)


;; Enhances M-x to allow easier execution of commands. Provides
;; a filterable list of possible commands in the minibuffer
;; http://www.emacswiki.org/emacs/Smex
(setq smex-save-file (concat user-emacs-directory ".smex-items"))
(smex-initialize)

(require 'smex) ; Not needed if you use package.el
(smex-initialize) ; Can be omitted. This might cause a (minimal) delay
; when Smex is auto-initialized on its first run.
(global-set-key (kbd "M-x") 'smex)
(global-set-key (kbd "M-X") 'smex-major-mode-commands)
(setq smex-save-file (concat user-emacs-directory ".smex-items"))

;; projectile everywhere!
(projectile-global-mode)

18 changes: 14 additions & 4 deletions customizations/setup-clojure.el
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
;; Java classes (e.g. JavaClassName)
(add-hook 'clojure-mode-hook 'subword-mode)

;; enable rainbow delimiters
(require 'rainbow-delimiters)
(add-hook 'clojure-mode-hook 'rainbow-delimiters-mode)

;; A little more syntax highlighting
(require 'clojure-mode-extra-font-locking)

Expand All @@ -30,11 +34,17 @@
;;;;

;; provides minibuffer documentation for the code you're typing into the repl
(add-hook 'cider-mode-hook 'cider-turn-on-eldoc-mode)
(add-hook 'cider-mode-hook 'eldoc-mode)

;; go right to the REPL buffer when it's finished connecting
(setq cider-repl-pop-to-buffer-on-connect t)

;; remove banner from showing up after each command
(setq cider-repl-display-help-banner nil)

;; include pretty printing for each evaluation
(setq cider-repl-use-pretty-printing t)

;; When there's a cider error, show its buffer and switch to it
(setq cider-show-error-buffer t)
(setq cider-auto-select-error-buffer t)
Expand Down Expand Up @@ -70,9 +80,9 @@
(interactive)
(cider-interactive-eval (format "(user/reset)")))

(defun cider-user-ns ()
(interactive)
(cider-repl-set-ns "user"))
;; (defun cider-user-ns ()
;; (interactive)
;; (cider-repl-set-ns "user"))

(eval-after-load 'cider
'(progn
Expand Down
6 changes: 0 additions & 6 deletions customizations/shell-integration.el

This file was deleted.

Loading