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]'`"
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
install: autoloads _install init.elc
install: autoloads _install core/core.elc init.elc
update: autoloads _update core/core.elc init.elc
autoloads:
@ -27,18 +27,19 @@ clean-cache:
@find $(CACHE_DIR) -type f -maxdepth 1 -delete
@rm -f $(CACHE_DIR)/{workgroups,pcache,ltxpng,backup}/*
clean-lite:
@rm -f init.elc core/core.elc
########################################
%.elc: %.el
@$(EMACS) --batch -l init.el -f batch-byte-compile 2>&1 $<
_update:
_update: clean-lite
@cask update 2>&1
@rm -f init.elc core/core.elc
_install:
_install: clean-lite
@cask install 2>&1
@rm -f init.elc core/core.elc
@mkdir -p $(CACHE_DIR)/{undo,backup,workgroups}
.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
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)
![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
# Optional
make compile # compiles core and autoloaded files
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
@ -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)
---
![Yay! Evil!](https://raw.githubusercontent.com/hlissner/.emacs.d/screenshots/cacochan.png)

View file

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

View file

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

View file

@ -68,10 +68,7 @@
(use-package helm-buffers
:commands (helm-buffers-list helm-mini)
:config
(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))
:config (advice-add 'helm-buffer-list :override 'helm*buffer-list))
(use-package helm-tags
:commands (helm-tags-get-tag-file helm-etags-select))

View file

@ -6,7 +6,6 @@
(fset 'yes-or-no-p 'y-or-n-p)
(setq-default
line-spacing 1
indicate-buffer-boundaries nil ; don't show where buffer starts/ends
indicate-empty-lines nil ; don't show empty lines
fringes-outside-margins t ; switches order of fringe and margin
@ -58,7 +57,7 @@
(push `(right-fringe . ,doom-fringe-size) default-frame-alist)
;; Default frame size on startup
(push '(width . 120) default-frame-alist)
(push '(height . 32) default-frame-alist)
(push '(height . 40) default-frame-alist)
;; no fringe in the minibuffer
(add-hook! (emacs-startup minibuffer-setup)
(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)
(lambda (b) (projectile-project-buffer-p b it))
buffers)
buffers)
(list doom-buffer))))
buffers))))
;;;###autoload
(defun doom/get-buffer-names (&optional project-p)
(mapcar (lambda (b) (buffer-name b))
(doom/get-buffers project-p)))
(mapcar #'buffer-name (doom/get-buffers project-p)))
;;;###autoload
(defun doom/get-visible-windows (&optional buffer-list)
(-map #'get-buffer-window
(doom/get-visible-buffers (or buffer-list (doom/get-buffers)))))
(mapcar #'get-buffer-window (doom/get-visible-buffers (or buffer-list (doom/get-buffers)))))
;;;###autoload
(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 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)
;;; defuns-helm.el ends here

View file

@ -52,8 +52,8 @@
(doom|nlinum-unhl-line)
(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)
(setq doom--hl-nlinum-overlay ov
doom--hl-nlinum-line line-no))))))))
(setq doom--hl-nlinum-line line-no
doom--hl-nlinum-overlay ov))))))))
(provide 'defuns-nlinum)
;;; defuns-nlinum.el ends here

View file

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