[emacs] Various improvements

This commit is contained in:
Correl Roush 2017-07-26 13:50:36 -04:00
parent f0deb1b398
commit d464261192

View file

@ -8,12 +8,50 @@
(setq inhibit-startup-screen +1)
#+END_SRC
* UI
** Powerline
Make the mode line prettier.
#+name: look-and-feel
#+BEGIN_SRC emacs-lisp
(use-package powerline
:ensure t
:config
(powerline-default-theme))
#+END_SRC
** Nyan-mode
Visualize the current position within the buffer in the modeline with nyancat!
#+name: look-and-feel
#+BEGIN_SRC emacs-lisp
(use-package nyan-mode
:ensure t
:config
(nyan-mode)
(nyan-start-animation))
#+END_SRC
** Theme
#+name: look-and-feel
#+BEGIN_SRC emacs-lisp
(use-package solarized-theme
(use-package moe-theme
:ensure t
:init (load-theme 'solarized-dark 't))
:config
(setq moe-theme-resize-markdown-title '(1.5 1.4 1.3 1.2 1.0 1.0))
(setq moe-theme-resize-org-title '(1.5 1.4 1.3 1.2 1.1 1.0 1.0 1.0 1.0))
(setq moe-theme-resize-rst-title '(1.5 1.4 1.3 1.2 1.1 1.0))
(setq moe-theme-highlight-buffer-id t)
(moe-theme-set-color 'cyan)
(powerline-moe-theme)
(moe-light))
#+END_SRC
** Major mode icons
Display major-mode names as icons in the mode line when possible.
#+name: look-and-feel
#+BEGIN_SRC emacs-lisp
(use-package mode-icons
:ensure t
:config (mode-icons-mode))
#+END_SRC
** Helm
#+name: packages
@ -48,9 +86,9 @@
Helm search plugin for [[Ag%20(The%20Silver%20Searcher)][Ag (The Silver Searcher)]]
#+name: packages
#+BEGIN_SRC emacs-lisp
(use-package helm-ag
:ensure t
:defer 1)
(use-package helm-ag
:ensure t
:commands (helm-ag))
#+END_SRC
*** helm-flyspell
#+name: packages
@ -65,12 +103,26 @@ Helm search plugin for [[Ag%20(The%20Silver%20Searcher)][Ag (The Silver Searcher
Replace isearch-forward with helm-swoop for a nicer experience.
#+BEGIN_NOTES
Quite usefully, using prefix arguments expands the lines of context
shown around the search results.
#+END_NOTES
#+name: packages
#+BEGIN_SRC emacs-lisp
(use-package helm-swoop
:ensure t
:commands (helm-swoop)
:bind (("C-s" . helm-swoop)))
:bind (("C-s" . helm-swoop))
:config
;; Defaults to (lambda () (thing-at-point 'symbol)).
;; Setting it to return nil, as I find it tends to be more annoying than useful.
(setq helm-swoop-pre-input-function (lambda () nil))
;; Enable syntax highlighting. It makes it easier for my eyes to
;; parse the results, and doesn't seem to slow things down
;; measurably.
(setq helm-swoop-speed-or-color t)
)
#+END_SRC
* Coding
** Languages
@ -94,13 +146,17 @@ Replace isearch-forward with helm-swoop for a nicer experience.
(setq inferior-lisp-program "clisp")
(use-package paredit
:ensure t)
:ensure t
:commands (paredit-mode)
:diminish " ")
(use-package rainbow-identifiers
:ensure t)
:ensure t
:commands (rainbow-identifiers-mode))
(use-package rainbow-delimiters
:ensure t)
:ensure t
:commands (rainbow-delimiters-mode))
(let ((lisp-mode-hooks
(mapcar (lambda (lisp)
@ -346,23 +402,16 @@ Configure jedi and company-mode to provide auto-completion for python.
#+END_SRC
*** PlantUML
Install [[https://github.com/skuro/puml-mode][puml-mode]] and alias it as plantuml-mode so it plays nice with
org documents and ob-plantuml.
#+name: programming
#+BEGIN_SRC emacs-lisp
(use-package puml-mode
(use-package plantuml-mode
:ensure t
:mode "\\.plantuml\\'"
:commands puml-mode
:init
(define-derived-mode plantuml-mode
puml-mode "PlantUML Mode"))
:commands plantuml-mode)
#+END_SRC
Don't forget to configure =org-plantuml-jar-path= and
=puml-plantuml-jar-path= to point to a version of plantuml.jar on your
=plantuml-jar-path= to point to a version of plantuml.jar on your
system.
** Tools
*** Projectile
@ -370,13 +419,13 @@ system.
#+BEGIN_SRC emacs-lisp
(use-package projectile
:ensure t
:defer 1
:config
(projectile-mode t)
:diminish " 📁"
:init
(use-package helm-projectile
:ensure t
:config (helm-projectile-on)))
:config (helm-projectile-on))
:config
(projectile-mode t))
#+END_SRC
*** Autocomplete
**** Company
@ -387,6 +436,7 @@ Install and configure Company for auto-completion.
#+BEGIN_SRC emacs-lisp
(use-package company
:ensure t
:commands (company-mode)
:config (progn
(add-hook 'prog-mode-hook 'company-mode)
@ -401,7 +451,8 @@ require it.
#+name: autocomplete
#+begin_src emacs-lisp
(use-package auto-complete
:ensure t)
:ensure t
:defer t)
#+end_src
*** Flycheck
@ -409,6 +460,7 @@ require it.
#+BEGIN_SRC emacs-lisp
(use-package flycheck
:ensure t
:diminish " ✓"
:init
(add-hook 'after-init-hook #'global-flycheck-mode))
#+END_SRC
@ -454,7 +506,7 @@ magnitude faster.
#+BEGIN_SRC emacs-lisp
(use-package ag
:ensure t
:defer 1)
:commands (ag))
#+END_SRC
*** Expand Region
Increase selected region by semantic units.
@ -537,7 +589,8 @@ names.
#+name: packages
#+begin_src emacs-lisp
(use-package ob-http
:ensure t)
:ensure t
:defer t)
#+end_src
***** Language evaluation
@ -664,7 +717,8 @@ Taken from [[http://pragmaticemacs.com/emacs/wrap-text-in-an-org-mode-block/][Pr
#+name: packages
#+BEGIN_SRC emacs-lisp
(use-package tex-site
:ensure auctex)
:ensure auctex
:mode ("\\.tex$" . TeX-latex-mode))
#+END_SRC
**** LaTeX-Extra
#+name: packages