General cleanup + update readme

This commit is contained in:
Henrik Lissner 2016-05-30 21:19:10 -04:00
parent d9bdb067df
commit 412dd71ffc
10 changed files with 39 additions and 43 deletions

View file

@ -2,10 +2,10 @@ EMACS=emacs
CACHE_DIR="private/cache/`hostname`/`emacs --version | grep -o '2[0-9]\.[0-9]'`" CACHE_DIR="private/cache/`hostname`/`emacs --version | grep -o '2[0-9]\.[0-9]'`"
REPO_URL="https://github.com/hlissner" REPO_URL="https://github.com/hlissner"
all: install autoloads init.elc all: install
# If you run either of these with emacs open, run doom-reload afterwards # If you run either of these with emacs open, run doom-reload afterwards
install: autoloads _install init.elc install: autoloads _install core/core.elc init.elc
update: autoloads _update core/core.elc init.elc update: autoloads _update core/core.elc init.elc
autoloads: autoloads:
@ -27,18 +27,19 @@ clean-cache:
@find $(CACHE_DIR) -type f -maxdepth 1 -delete @find $(CACHE_DIR) -type f -maxdepth 1 -delete
@rm -f $(CACHE_DIR)/{workgroups,pcache,ltxpng,backup}/* @rm -f $(CACHE_DIR)/{workgroups,pcache,ltxpng,backup}/*
clean-lite:
@rm -f init.elc core/core.elc
######################################## ########################################
%.elc: %.el %.elc: %.el
@$(EMACS) --batch -l init.el -f batch-byte-compile 2>&1 $< @$(EMACS) --batch -l init.el -f batch-byte-compile 2>&1 $<
_update: _update: clean-lite
@cask update 2>&1 @cask update 2>&1
@rm -f init.elc core/core.elc
_install: _install: clean-lite
@cask install 2>&1 @cask install 2>&1
@rm -f init.elc core/core.elc
@mkdir -p $(CACHE_DIR)/{undo,backup,workgroups} @mkdir -p $(CACHE_DIR)/{undo,backup,workgroups}
.PHONY: all .PHONY: all

View file

@ -4,6 +4,14 @@ This is an Emacs configuration for stubborn vimmers and silent demon
annihilating protagonists alike. It strives to emulate vim as best it can, and annihilating protagonists alike. It strives to emulate vim as best it can, and
surpass it in any way possible. surpass it in any way possible.
<center>
[![Yay! Evil!](https://raw.githubusercontent.com/hlissner/.emacs.d/screenshots/cacochan.png)](http://ultravioletbat.deviantart.com/art/Yay-Evil-111710573)
</center>
<br />
It is tailored to OSX 10.11+, Emacs 24.5.1+ and my needs as a software
developer, designer, scientist and doom enthusiast.
![Splash page screenshot](https://raw.githubusercontent.com/hlissner/.emacs.d/screenshots/scratch.png?raw=true) ![Splash page screenshot](https://raw.githubusercontent.com/hlissner/.emacs.d/screenshots/scratch.png?raw=true)
![Main screenshots](https://raw.githubusercontent.com/hlissner/.emacs.d/screenshots/main.png?raw=true) ![Main screenshots](https://raw.githubusercontent.com/hlissner/.emacs.d/screenshots/main.png?raw=true)
@ -17,10 +25,14 @@ cd ~/.emacs.d
make # installs plugins via cask and generates autoloads make # installs plugins via cask and generates autoloads
# Optional # Optional
make compile # compiles core and autoloaded files
make snippets # install hlissner/emacs-snippets into private/snippets make snippets # install hlissner/emacs-snippets into private/snippets
``` ```
To byte compile, run `(doom-byte-compile)` For a more comprehensive byte compile, run `:bc!` (`:bc` will compile the
current *.el file).
## Features ## Features
@ -75,5 +87,4 @@ To get a picture of what's in here, check out:
![py/rb version in modeline](https://raw.githubusercontent.com/hlissner/.emacs.d/screenshots/version.png?raw=true) ![py/rb version in modeline](https://raw.githubusercontent.com/hlissner/.emacs.d/screenshots/version.png?raw=true)
---
![Yay! Evil!](https://raw.githubusercontent.com/hlissner/.emacs.d/screenshots/cacochan.png)

View file

@ -15,13 +15,11 @@
("/\\.gitignore$" "__" gitignore-mode) ("/\\.gitignore$" "__" gitignore-mode)
("/Dockerfile$" "__" dockerfile-mode) ("/Dockerfile$" "__" dockerfile-mode)
("/docker-compose.yml$" "__" yaml-mode) ("/docker-compose.yml$" "__" yaml-mode)
;; Org-mode ;; Org-mode
("\\.org$" "__" org-mode) ("\\.org$" "__" org-mode)
("/Work/.+\\.org$" "__project.org" org-mode) ("/Work/.+\\.org$" "__project.org" org-mode)
("/Invoices/.+\\.org$" "__invoice.org" org-mode) ("/Invoices/.+\\.org$" "__invoice.org" org-mode)
("/Contacts/.+\\.org$" "__contact.org" org-mode) ("/Contacts/.+\\.org$" "__contact.org" org-mode)
;; C/C++ ;; C/C++
("/Makefile$" "__" makefile-gmake-mode) ("/Makefile$" "__" makefile-gmake-mode)
("/main\\.\\(cc\\|cpp\\)$" "__main.cpp" c++-mode) ("/main\\.\\(cc\\|cpp\\)$" "__main.cpp" c++-mode)
@ -30,48 +28,38 @@
("\\.\\(cc\\|cpp\\)$" "__cpp" c++-mode) ("\\.\\(cc\\|cpp\\)$" "__cpp" c++-mode)
("\\.h$" "__h" c-mode) ("\\.h$" "__h" c-mode)
("\\.c$" "__c" c-mode) ("\\.c$" "__c" c-mode)
;; Elisp ;; Elisp
("-test\\.el$" "__" emacs-ert-mode) ("-test\\.el$" "__" emacs-ert-mode)
("/.+\\.el$" "__initfile" emacs-lisp-mode) ("/.+\\.el$" "__initfile" emacs-lisp-mode)
("\\(\\.emacs\\.d\\|doom-emacs\\)/private/\\(snippets\\|templates\\)/.+$" ("\\(\\.emacs\\.d\\|doom-emacs\\)/private/\\(snippets\\|templates\\)/.+$"
"__" snippet-mode) "__" snippet-mode)
;; Go ;; Go
("/main\\.go$" "__main.go" go-mode t) ("/main\\.go$" "__main.go" go-mode t)
("\\.go$" "__.go" go-mode) ("\\.go$" "__.go" go-mode)
;; HTML ;; HTML
("\\.html$" "__.html" web-mode) ("\\.html$" "__.html" web-mode)
;; java ;; java
("/src/.+/.+\\.java$" "__" java-mode) ("/src/.+/.+\\.java$" "__" java-mode)
("/main\\.java$" "__main" java-mode) ("/main\\.java$" "__main" java-mode)
("/build\\.gradle$" "__build.gradle" android-mode) ("/build\\.gradle$" "__build.gradle" android-mode)
;; Javascript ;; Javascript
("\\.lbaction/.+/Info.plist$" "__Info.plst" lb6-mode) ("\\.lbaction/.+/Info.plist$" "__Info.plst" lb6-mode)
("\\.lbaction/.+/\\(default\\|suggestions\\)\\.js$" "__default.js" lb6-mode) ("\\.lbaction/.+/\\(default\\|suggestions\\)\\.js$" "__default.js" lb6-mode)
("/package\\.json$" "__package.json" json-mode) ("/package\\.json$" "__package.json" json-mode)
("/bower\\.json$" "__bower.json" json-mode) ("/bower\\.json$" "__bower.json" json-mode)
("\\.\\(json\\|jshintrc\\)$" "__" json-mode) ("\\.\\(json\\|jshintrc\\)$" "__" json-mode)
;; Lua ;; Lua
("/main\\.lua$" "__main.lua" love-mode) ("/main\\.lua$" "__main.lua" love-mode)
("/conf\\.lua$" "__conf.lua" love-mode) ("/conf\\.lua$" "__conf.lua" love-mode)
;; Markdown ;; Markdown
("\\.md$" "__" markdown-mode) ("\\.md$" "__" markdown-mode)
;; PHP ;; PHP
("\\.class\\.php$" "__.class.php" php-mode) ("\\.class\\.php$" "__.class.php" php-mode)
("\\.php$" "__" php-mode) ("\\.php$" "__" php-mode)
;; Python ;; Python
;;"tests?/test_.+\\.py$" "__" nose-mode) ;;("tests?/test_.+\\.py$" "__" nose-mode)
;;"/setup\\.py$" "__setup.py" python-mode) ;;("/setup\\.py$" "__setup.py" python-mode)
("\\.py$" "__" python-mode) ("\\.py$" "__" python-mode)
;; Ruby ;; Ruby
("/\\.rspec$" "__.rspec" rspec-mode) ("/\\.rspec$" "__.rspec" rspec-mode)
("/spec_helper\\.rb$" "__helper" rspec-mode t) ("/spec_helper\\.rb$" "__helper" rspec-mode t)
@ -81,19 +69,15 @@
("\\.gemspec$" "__.gemspec" ruby-mode t) ("\\.gemspec$" "__.gemspec" ruby-mode t)
("/lib/.+\\.rb$" "__module" ruby-mode t) ("/lib/.+\\.rb$" "__module" ruby-mode t)
("\\.rb$" "__" ruby-mode) ("\\.rb$" "__" ruby-mode)
;; Rust ;; Rust
("/Cargo.toml$" "__Cargo.toml" rust-mode) ("/Cargo.toml$" "__Cargo.toml" rust-mode)
("/main\\.rs$" "__main.rs" rust-mode) ("/main\\.rs$" "__main.rs" rust-mode)
;; SCSS ;; SCSS
("/master\\.scss$" "__master.scss" scss-mode) ("/master\\.scss$" "__master.scss" scss-mode)
("/normalize\\.scss$" "__normalize.scss" scss-mode) ("/normalize\\.scss$" "__normalize.scss" scss-mode)
("\\.scss$" "__" scss-mode) ("\\.scss$" "__" scss-mode)
;; Slim ;; Slim
("/\\(index\\|main\\)\\.slim$" "__" slim-mode) ("/\\(index\\|main\\)\\.slim$" "__" slim-mode)
;; Shell scripts ;; Shell scripts
("\\.z?sh$" "__" sh-mode) ("\\.z?sh$" "__" sh-mode)
))) )))

View file

@ -10,7 +10,6 @@
delete-trailing-lines nil delete-trailing-lines nil
fill-column 80 fill-column 80
indent-tabs-mode nil indent-tabs-mode nil
line-spacing 0
require-final-newline t require-final-newline t
tab-always-indent t tab-always-indent t
tab-width 4 tab-width 4

View file

@ -68,10 +68,7 @@
(use-package helm-buffers (use-package helm-buffers
:commands (helm-buffers-list helm-mini) :commands (helm-buffers-list helm-mini)
:config :config (advice-add 'helm-buffer-list :override 'helm*buffer-list))
(defvar doom-helm-force-project-buffers nil)
(defun helm*buffer-list (&rest _) (doom/get-buffer-names doom-helm-force-project-buffers))
(advice-add 'helm-buffer-list :override 'helm*buffer-list))
(use-package helm-tags (use-package helm-tags
:commands (helm-tags-get-tag-file helm-etags-select)) :commands (helm-tags-get-tag-file helm-etags-select))

View file

@ -6,7 +6,6 @@
(fset 'yes-or-no-p 'y-or-n-p) (fset 'yes-or-no-p 'y-or-n-p)
(setq-default (setq-default
line-spacing 1
indicate-buffer-boundaries nil ; don't show where buffer starts/ends indicate-buffer-boundaries nil ; don't show where buffer starts/ends
indicate-empty-lines nil ; don't show empty lines indicate-empty-lines nil ; don't show empty lines
fringes-outside-margins t ; switches order of fringe and margin fringes-outside-margins t ; switches order of fringe and margin
@ -58,7 +57,7 @@
(push `(right-fringe . ,doom-fringe-size) default-frame-alist) (push `(right-fringe . ,doom-fringe-size) default-frame-alist)
;; Default frame size on startup ;; Default frame size on startup
(push '(width . 120) default-frame-alist) (push '(width . 120) default-frame-alist)
(push '(height . 32) default-frame-alist) (push '(height . 40) default-frame-alist)
;; no fringe in the minibuffer ;; no fringe in the minibuffer
(add-hook! (emacs-startup minibuffer-setup) (add-hook! (emacs-startup minibuffer-setup)
(set-window-fringes (minibuffer-window) 0 0 nil)) (set-window-fringes (minibuffer-window) 0 0 nil))

View file

@ -55,18 +55,15 @@ Inspired from http://demonastery.org/2013/04/emacs-evil-narrow-region/"
(funcall (if (eq project-p 'not) '-remove '-filter) (funcall (if (eq project-p 'not) '-remove '-filter)
(lambda (b) (projectile-project-buffer-p b it)) (lambda (b) (projectile-project-buffer-p b it))
buffers) buffers)
buffers) buffers))))
(list doom-buffer))))
;;;###autoload ;;;###autoload
(defun doom/get-buffer-names (&optional project-p) (defun doom/get-buffer-names (&optional project-p)
(mapcar (lambda (b) (buffer-name b)) (mapcar #'buffer-name (doom/get-buffers project-p)))
(doom/get-buffers project-p)))
;;;###autoload ;;;###autoload
(defun doom/get-visible-windows (&optional buffer-list) (defun doom/get-visible-windows (&optional buffer-list)
(-map #'get-buffer-window (mapcar #'get-buffer-window (doom/get-visible-buffers (or buffer-list (doom/get-buffers)))))
(doom/get-visible-buffers (or buffer-list (doom/get-buffers)))))
;;;###autoload ;;;###autoload
(defun doom/get-visible-buffers (&optional buffer-list) (defun doom/get-visible-buffers (&optional buffer-list)

View file

@ -90,5 +90,13 @@ buffers."
(set-face-attribute 'helm-source-header nil :height 0.1 :foreground "#111111") (set-face-attribute 'helm-source-header nil :height 0.1 :foreground "#111111")
(set-face-attribute 'helm-source-header nil :height 1.0 :foreground doom-helm-header-fg))) (set-face-attribute 'helm-source-header nil :height 1.0 :foreground doom-helm-header-fg)))
(defvar doom-helm-force-project-buffers nil
"If non-nil, helm-buffers-list will only show project buffers.")
;;;###autoload
(defun helm*buffer-list (&rest _)
(append (doom/get-buffer-names doom-helm-force-project-buffers)
(list doom-buffer-name)))
(provide 'defuns-helm) (provide 'defuns-helm)
;;; defuns-helm.el ends here ;;; defuns-helm.el ends here

View file

@ -52,8 +52,8 @@
(doom|nlinum-unhl-line) (doom|nlinum-unhl-line)
(let ((str (nth 1 (get-text-property 0 'display (overlay-get ov 'before-string))))) (let ((str (nth 1 (get-text-property 0 'display (overlay-get ov 'before-string)))))
(put-text-property 0 (length str) 'face 'doom-nlinum-highlight str) (put-text-property 0 (length str) 'face 'doom-nlinum-highlight str)
(setq doom--hl-nlinum-overlay ov (setq doom--hl-nlinum-line line-no
doom--hl-nlinum-line line-no)))))))) doom--hl-nlinum-overlay ov))))))))
(provide 'defuns-nlinum) (provide 'defuns-nlinum)
;;; defuns-nlinum.el ends here ;;; defuns-nlinum.el ends here

View file

@ -13,7 +13,7 @@
(--any? (if (window-live-p it) t (doom/popup-remove it) nil) (--any? (if (window-live-p it) t (doom/popup-remove it) nil)
doom-popup-windows) doom-popup-windows)
(if window (if window
(--any? (eq window it) doom-popup-windows) (memq window doom-popup-windows)
t))) t)))
;;;###autoload ;;;###autoload