mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
13
Makefile
13
Makefile
@@ -11,17 +11,19 @@ backup-elpa:
|
||||
|
||||
.PHONY: vendor
|
||||
vendor: \
|
||||
vendor/escreen.el \
|
||||
vendor/dired+.el \
|
||||
vendor/escreen.el \
|
||||
vendor/hideshowvis.el \
|
||||
vendor/linum+.el
|
||||
vendor/linum+.el \
|
||||
vendor/rubocopfmt.el
|
||||
|
||||
.PHONY: update_vendor
|
||||
update_vendor: \
|
||||
update_vendor/escreen.el \
|
||||
update_vendor/dired+.el \
|
||||
update_vendor/escreen.el \
|
||||
update_vendor/hideshowvis.el \
|
||||
update_vendor/linum+.el
|
||||
update_vendor/linum+.el \
|
||||
update_vendor/rubocopfmt.el
|
||||
|
||||
#
|
||||
# Internals
|
||||
@@ -44,7 +46,8 @@ endef
|
||||
# Specify vendor targets
|
||||
#
|
||||
|
||||
$(eval $(call vendored,vendor/escreen.el,"https://github.com/renard/escreen-el/raw/master/escreen.el"))
|
||||
$(eval $(call vendored,vendor/dired+.el,"https://www.emacswiki.org/emacs/download/dired%2b.el"))
|
||||
$(eval $(call vendored,vendor/escreen.el,"https://github.com/renard/escreen-el/raw/master/escreen.el"))
|
||||
$(eval $(call vendored,vendor/hideshowvis.el,"https://www.emacswiki.org/emacs/download/hideshowvis.el"))
|
||||
$(eval $(call vendored,vendor/linum+.el,"http://www.emacswiki.org/emacs/download/linum%2b.el"))
|
||||
$(eval $(call vendored,vendor/rubocopfmt.el,"https://github.com/jimeh/rubocopfmt.el/raw/master/rubocopfmt.el"))
|
||||
|
||||
@@ -68,5 +68,13 @@ Borrowed from: http://emacsredux.com/blog/2013/05/04/rename-file-and-buffer/"
|
||||
(set-visited-file-name new-name)
|
||||
(set-buffer-modified-p nil)))))))
|
||||
|
||||
(defun siren-ignore-error-wrapper (fn)
|
||||
"Funtion return new function that ignore errors.
|
||||
The function wraps a function with `ignore-errors' macro."
|
||||
(lexical-let ((fn fn))
|
||||
(lambda ()
|
||||
(interactive)
|
||||
(ignore-errors (funcall fn)))))
|
||||
|
||||
(provide 'siren-core)
|
||||
;;; siren-core.el ends here
|
||||
|
||||
@@ -8,73 +8,87 @@
|
||||
|
||||
(setq siren-modules-dir (expand-file-name "modules" siren-dir))
|
||||
(add-to-list 'load-path siren-modules-dir)
|
||||
(siren-add-subfolders-to-load-path siren-modules-dir)
|
||||
|
||||
;; Modules
|
||||
;; Core
|
||||
(require 'siren-aliases)
|
||||
(require 'siren-global-keybindings)
|
||||
(require 'siren-packages)
|
||||
|
||||
;; Completion
|
||||
(require 'siren-company)
|
||||
|
||||
;; Editor
|
||||
(require 'siren-browse-kill-ring)
|
||||
(require 'siren-evil)
|
||||
(require 'siren-ido)
|
||||
(require 'siren-linum)
|
||||
(require 'siren-linum-relative)
|
||||
(require 'siren-rainbow)
|
||||
(require 'siren-smex)
|
||||
(require 'siren-undo-tree)
|
||||
(require 'siren-which-key)
|
||||
|
||||
;; Linting
|
||||
(require 'siren-flycheck)
|
||||
|
||||
;; Navigation
|
||||
(require 'siren-anzu)
|
||||
(require 'siren-avy)
|
||||
(require 'siren-browse-kill-ring)
|
||||
(require 'siren-company)
|
||||
(require 'siren-diff-hl)
|
||||
(require 'siren-dired)
|
||||
(require 'siren-direx)
|
||||
(require 'siren-dumb-jump)
|
||||
(require 'siren-editorconfig)
|
||||
(require 'siren-evil)
|
||||
(require 'siren-flyspell)
|
||||
(require 'siren-folding)
|
||||
(require 'siren-full-ack)
|
||||
(require 'siren-git-link)
|
||||
(require 'siren-git-timemachine)
|
||||
(require 'siren-github)
|
||||
(require 'siren-global-keybindings)
|
||||
(require 'siren-goto-chg)
|
||||
(require 'siren-goto-symbol)
|
||||
(require 'siren-helm)
|
||||
(require 'siren-helm-ag)
|
||||
(require 'siren-helm-gtags)
|
||||
(require 'siren-helm-open-github)
|
||||
(require 'siren-helm-projectile)
|
||||
(require 'siren-helm-swoop)
|
||||
(require 'siren-ido)
|
||||
(require 'siren-linum)
|
||||
(require 'siren-linum-relative)
|
||||
(require 'siren-magit)
|
||||
(require 'siren-move-beginning-of-line)
|
||||
(require 'siren-multiple-cursors)
|
||||
(require 'siren-org-mode)
|
||||
(require 'siren-package-lint)
|
||||
(require 'siren-rainbow)
|
||||
(require 'siren-scroll-half-screen)
|
||||
(require 'siren-smartparens)
|
||||
(require 'siren-smex)
|
||||
(require 'siren-string-inflection)
|
||||
(require 'siren-text-manipulation)
|
||||
(require 'siren-toggle-quotes)
|
||||
(require 'siren-undo-tree)
|
||||
(require 'siren-which-key)
|
||||
(require 'siren-window-management)
|
||||
(require 'siren-yasnippet)
|
||||
(require 'siren-zoom-window)
|
||||
;; (require 'siren-auto-complete)
|
||||
;; (require 'siren-edit-server)
|
||||
;; (require 'siren-swiper)
|
||||
;; (require 'siren-volatile-highlights)
|
||||
;; (require 'siren-zone)
|
||||
|
||||
;; Project management
|
||||
(require 'siren-editorconfig)
|
||||
(require 'siren-helm-projectile)
|
||||
(require 'siren-neotree)
|
||||
(require 'siren-projectile)
|
||||
;; (require 'siren-ecb)
|
||||
;; (require 'siren-project-explorer)
|
||||
;; (require 'siren-treemacs)
|
||||
|
||||
;; Spelling
|
||||
(require 'siren-flyspell)
|
||||
|
||||
;; Text editing
|
||||
(require 'siren-expand-region)
|
||||
(require 'siren-goto-chg)
|
||||
(require 'siren-move-dup)
|
||||
(require 'siren-multiple-cursors)
|
||||
(require 'siren-randomize-region)
|
||||
(require 'siren-smart-shift)
|
||||
(require 'siren-smartparens)
|
||||
(require 'siren-sort-symbols)
|
||||
(require 'siren-sort-words)
|
||||
(require 'siren-string-inflection)
|
||||
(require 'siren-toggle-comments)
|
||||
(require 'siren-toggle-quotes)
|
||||
(require 'siren-yasnippet)
|
||||
|
||||
;; Version control
|
||||
(require 'siren-diff-hl)
|
||||
(require 'siren-ediff)
|
||||
(require 'siren-git-timemachine)
|
||||
(require 'siren-github)
|
||||
(require 'siren-magit)
|
||||
|
||||
;; Window management
|
||||
(require 'siren-buffer-move)
|
||||
(require 'siren-resize-window)
|
||||
(require 'siren-windmove)
|
||||
(require 'siren-zoom-window)
|
||||
|
||||
;; Workspace management
|
||||
(require 'siren-escreen)
|
||||
;; (require 'siren-elscreen)
|
||||
;; (require 'siren-eyebrowse)
|
||||
;; (require 'siren-perspective)
|
||||
;; (require 'siren-workgroups2)
|
||||
|
||||
;; Languages
|
||||
(require 'siren-coffee)
|
||||
@@ -85,7 +99,7 @@
|
||||
(require 'siren-emacs-lisp)
|
||||
(require 'siren-gitconfig)
|
||||
(require 'siren-gitignore)
|
||||
(require 'siren-go)
|
||||
(require 'siren-golang)
|
||||
(require 'siren-haml)
|
||||
(require 'siren-js)
|
||||
(require 'siren-json)
|
||||
@@ -93,16 +107,20 @@
|
||||
(require 'siren-lua)
|
||||
(require 'siren-makefile)
|
||||
(require 'siren-markdown)
|
||||
(require 'siren-org-mode)
|
||||
(require 'siren-php)
|
||||
(require 'siren-plantuml)
|
||||
(require 'siren-prog-mode)
|
||||
(require 'siren-ruby)
|
||||
(require 'siren-rust)
|
||||
(require 'siren-sass)
|
||||
(require 'siren-scss)
|
||||
(require 'siren-sh)
|
||||
(require 'siren-slim)
|
||||
(require 'siren-text-mode)
|
||||
(require 'siren-thrift)
|
||||
(require 'siren-web-mode)
|
||||
(require 'siren-yaml)
|
||||
;; (require 'siren-slim)
|
||||
|
||||
(provide 'siren-modules)
|
||||
;;; siren-modules.el ends here
|
||||
|
||||
@@ -7,13 +7,12 @@
|
||||
'(magit-commit-arguments (quote ("-S")))
|
||||
'(package-selected-packages
|
||||
(quote
|
||||
(ace-ack ag anti-anywhere anzu-avy bright-bright browse browse-buffer coffee-column company-company completing-cursors dash-descbinds describe-diff diminish-direx-dockerfile dumb-dup-ecb editorconfig-eldoc-eslintd-evil exec-expand feature file-fill fix-flycheck flycheck flycheck-from full-gh git-git gitconfig-github github-gitignore go-go go-go go-go gometalinter-gotest gtags-guides guru-haml helm-helm helm-helm helm-helm helm-helm highlight-highlight highlight-hl ido-ido-imenu indent-indentation indicator inf-inflection json jump-kill line link-lint linum-lua magit-magit markdown-mode mode-mode mode-mode mode-mode mode-mode mode mode-mode mode mode-mode mode mode-mode-mode mode-modes-move+ move-multiple open-package package-package-path phi-php plantuml-projectile-projectile pulls-quotes rainbow-read refactor region-relative rename-ring rspec-ruby-ruby ruby-sass scss-search shell shift smart-smart smartparens smex-string swoop-symbol-theme theme thrift-timemachine-toggle tools twilight-twilight use-vertical-web window-window-yaml-yari yasnippet zoom)))
|
||||
'(plantuml-jar-path "/usr/local/Cellar/plantuml/8048/plantuml.8048.jar")
|
||||
'(siren-rubocop-autocorrect-on-save nil))
|
||||
(zoom-window yasnippet-snippets yari yaml-mode which-key web-mode use-package toggle-quotes thrift string-inflection smex smartparens smart-shift smart-mode-line slim-mode seeing-is-believing scss-mode sass-mode rust-playground ruby-tools ruby-refactor ruby-compilation rspec-mode robe rjsx-mode resize-window rainbow-mode racer prettier-js plantuml-mode php-mode phi-search neotree multiple-cursors move-dup markdown-mode magit-gh-pulls lua-mode linum-relative json-mode imenu-anywhere ido-vertical-mode ido-completing-read+ highlight-symbol highlight-indentation highlight-indent-guides helm-swoop helm-projectile helm-open-github helm-gtags helm-describe-modes helm-descbinds helm-ag go-projectile go-playground gitignore-mode github-browse-file gitconfig-mode git-timemachine git-link full-ack flycheck-rust flycheck-gometalinter fill-column-indicator feature-mode expand-region exec-path-from-shell evil eslintd-fix editorconfig dumb-jump doom-themes dockerfile-mode direx diminish diff-hl company-go coffee-mode cargo buffer-move browse-kill-ring anzu ace-window))))
|
||||
(custom-set-faces
|
||||
;; custom-set-faces was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
'(go-guru-hl-identifier-face ((t (:background "gray30"))))
|
||||
'(markdown-code-face ((t nil)))
|
||||
'(sp-pair-overlay-face ((t (:inherit nil)))))
|
||||
|
||||
@@ -9,6 +9,12 @@
|
||||
(require 'siren-flyspell)
|
||||
|
||||
(use-package auto-complete
|
||||
:bind (:map ac-completing-map
|
||||
("RET" . ac-complete)
|
||||
("C-m" . ac-complete)
|
||||
("C-s" . ac-isearch)
|
||||
("C-n" . ac-next)
|
||||
("C-p" . ac-previous))
|
||||
:config
|
||||
(ac-flyspell-workaround)
|
||||
|
||||
@@ -17,13 +23,6 @@
|
||||
ac-delay 0.05
|
||||
ac-menu-height 15)
|
||||
|
||||
(let ((map ac-completing-map))
|
||||
(define-key map (kbd "RET") 'ac-complete)
|
||||
(define-key map (kbd "C-m") 'ac-complete)
|
||||
(define-key map (kbd "C-s") 'ac-isearch)
|
||||
(define-key map (kbd "C-n") 'ac-next)
|
||||
(define-key map (kbd "C-p") 'ac-previous))
|
||||
|
||||
;; Auto-complete when indenting.
|
||||
(defadvice indent-for-tab-command (around ac-before-indent activate)
|
||||
"Call `auto-complete' if text was recently entered."
|
||||
@@ -9,11 +9,7 @@
|
||||
(require 'siren-fci)
|
||||
|
||||
(use-package company
|
||||
:config
|
||||
|
||||
;; work-around for issues with fci-mode
|
||||
(defvar-local company-fci-mode-on-p nil)
|
||||
|
||||
:init
|
||||
(defun company-turn-off-fci (&rest ignore)
|
||||
(when (boundp 'fci-mode)
|
||||
(setq company-fci-mode-on-p fci-mode)
|
||||
@@ -22,6 +18,10 @@
|
||||
(defun company-maybe-turn-on-fci (&rest ignore)
|
||||
(when company-fci-mode-on-p (fci-mode 1)))
|
||||
|
||||
:config
|
||||
;; work-around for issues with fci-mode
|
||||
(defvar-local company-fci-mode-on-p nil)
|
||||
|
||||
(add-hook 'company-completion-started-hook 'company-turn-off-fci)
|
||||
(add-hook 'company-completion-finished-hook 'company-maybe-turn-on-fci)
|
||||
(add-hook 'company-completion-cancelled-hook 'company-maybe-turn-on-fci)
|
||||
23
modules/core/siren-packages.el
Normal file
23
modules/core/siren-packages.el
Normal file
@@ -0,0 +1,23 @@
|
||||
;;; siren-packages.el --- jimeh's Emacs Siren: avy configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for packages.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'siren-flycheck)
|
||||
|
||||
(use-package package-lint
|
||||
:defer t)
|
||||
|
||||
(use-package package-build
|
||||
:defer t)
|
||||
|
||||
(use-package flycheck-package
|
||||
:defer t
|
||||
:config
|
||||
(flycheck-package-setup))
|
||||
|
||||
(provide 'siren-packages)
|
||||
;;; siren-packages.el ends here
|
||||
@@ -7,7 +7,7 @@
|
||||
;;; Code:
|
||||
|
||||
(use-package browse-kill-ring
|
||||
:init
|
||||
:config
|
||||
(browse-kill-ring-default-keybindings))
|
||||
|
||||
(provide 'siren-browse-kill-ring)
|
||||
@@ -8,6 +8,8 @@
|
||||
|
||||
(use-package edit-server
|
||||
:if window-system
|
||||
:hook (after-init . edit-server-start)
|
||||
|
||||
:init
|
||||
(setq edit-server-default-major-mode 'markdown-mode
|
||||
edit-server-new-frame-alist
|
||||
@@ -15,9 +17,7 @@
|
||||
(width . 90)
|
||||
(height . 45)
|
||||
(minibuffer . t)
|
||||
(menu-bar-lines . t)))
|
||||
|
||||
(add-hook 'after-init-hook 'edit-server-start t))
|
||||
(menu-bar-lines . t))))
|
||||
|
||||
(provide 'siren-edit-server)
|
||||
;;; siren-edit-server.el ends here
|
||||
27
modules/editor/siren-evil.el
Normal file
27
modules/editor/siren-evil.el
Normal file
@@ -0,0 +1,27 @@
|
||||
;;; siren-evil.el --- jimeh's Emacs Siren: evil configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for evil.
|
||||
|
||||
;;; Code:
|
||||
|
||||
;; Various evil config options borrowed from:
|
||||
;; http://www.lukeswart.net/2015/04/lightning-intro-to-emacs-using-evil-mode-and-org-mode/
|
||||
(use-package evil
|
||||
:demand
|
||||
:bind (:map evil-normal-state-map
|
||||
;; Treat wrapped line scrolling as single lines.
|
||||
("j" . evil-next-visual-line)
|
||||
("k" . evil-previous-visual-line)
|
||||
;; esc quits pretty much anything (like pending prompts in the minibuffer)
|
||||
:map evil-normal-state-map ("<escape>" . keyboard-quit)
|
||||
:map evil-visual-state-map ("<escape>" . keyboard-quit)
|
||||
:map minibuffer-local-map ("<escape>" . minibuffer-keyboard-quit)
|
||||
:map minibuffer-local-ns-map ("<escape>" . minibuffer-keyboard-quit)
|
||||
:map minibuffer-local-completion-map ("<escape>" . minibuffer-keyboard-quit)
|
||||
:map minibuffer-local-must-match-map ("<escape>" . minibuffer-keyboard-quit)
|
||||
:map minibuffer-local-isearch-map ("<escape>" . minibuffer-keyboard-quit)))
|
||||
|
||||
(provide 'siren-evil)
|
||||
;;; siren-evil.el ends here
|
||||
@@ -7,6 +7,7 @@
|
||||
;;; Code:
|
||||
|
||||
(use-package fill-column-indicator
|
||||
:hook (prog-mode . fci-mode)
|
||||
:config
|
||||
(setq fci-rule-width 1
|
||||
fci-handle-trucate-lines nil))
|
||||
15
modules/editor/siren-highlight-indent-guides.el
Normal file
15
modules/editor/siren-highlight-indent-guides.el
Normal file
@@ -0,0 +1,15 @@
|
||||
;;; siren-highlight-indent-guides.el --- jimeh's Emacs Siren: highlight-indent-guides-mode configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for highlight-indent-guides-mode.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(use-package highlight-indent-guides
|
||||
:defer t
|
||||
:commands highlight-indent-guides-mode
|
||||
:diminish highlight-indent-guides-mode)
|
||||
|
||||
(provide 'siren-highlight-indent-guides)
|
||||
;;; siren-highlight-indent-guides.el ends here
|
||||
@@ -11,8 +11,5 @@
|
||||
:diminish (highlight-indentation-mode
|
||||
highlight-indentation-current-column-mode))
|
||||
|
||||
(use-package highlight-indent-guides
|
||||
:defer t)
|
||||
|
||||
(provide 'siren-highlight-indentation)
|
||||
;;; siren-highlight-indentation.el ends here
|
||||
26
modules/editor/siren-linum.el
Normal file
26
modules/editor/siren-linum.el
Normal file
@@ -0,0 +1,26 @@
|
||||
;;; siren-linum.el --- jimeh's Emacs Siren: linum configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for linum.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(use-package linum
|
||||
:ensure nil ;; loaded from emacs built-ins
|
||||
:hook (prog-mode . linum-mode))
|
||||
|
||||
(use-package linum+
|
||||
:ensure nil ;; loaded from vendor
|
||||
:after linum
|
||||
:init
|
||||
;; Customize line numbers - In GUI mode the fringe is the spacer between line
|
||||
;; numbers and code, while in console mode we add an extra space for it.
|
||||
(if window-system (setq linum+-dynamic-format " %%%dd")
|
||||
(setq linum+-dynamic-format " %%%dd "))
|
||||
|
||||
:config
|
||||
(setq linum-format 'dynamic))
|
||||
|
||||
(provide 'siren-linum)
|
||||
;;; siren-linum.el ends here
|
||||
@@ -7,7 +7,8 @@
|
||||
;;; Code:
|
||||
|
||||
(use-package rainbow-mode
|
||||
:defer t)
|
||||
:defer t
|
||||
:diminish raindbox-mode)
|
||||
|
||||
(provide 'siren-rainbow)
|
||||
;;; siren-rainbow.el ends here
|
||||
@@ -14,10 +14,8 @@
|
||||
("C-c C-m" . smex)
|
||||
("C-c C-c M-x" . execute-extended-command)
|
||||
|
||||
:init
|
||||
(setq smex-save-file (expand-file-name ".smex-items" siren-savefile-dir))
|
||||
|
||||
:config
|
||||
(setq smex-save-file (expand-file-name ".smex-items" siren-savefile-dir))
|
||||
(smex-initialize))
|
||||
|
||||
(provide 'siren-smex)
|
||||
@@ -7,6 +7,7 @@
|
||||
;;; Code:
|
||||
|
||||
(use-package undo-tree
|
||||
:demand
|
||||
:bind
|
||||
("C-x u" . undo-tree-visualize)
|
||||
("M--" . undo-tree-undo)
|
||||
@@ -17,10 +18,8 @@
|
||||
:diminish
|
||||
undo-tree-mode
|
||||
|
||||
:init
|
||||
(global-undo-tree-mode)
|
||||
|
||||
:config
|
||||
(global-undo-tree-mode)
|
||||
;; autosave the undo-tree history
|
||||
(setq undo-tree-history-directory-alist `((".*" . ,temporary-file-directory))
|
||||
undo-tree-auto-save-history t))
|
||||
@@ -6,10 +6,15 @@
|
||||
|
||||
;;; Code:
|
||||
|
||||
(use-package volatile-highlights-mode
|
||||
(require 'siren-undo-tree)
|
||||
|
||||
(use-package volatile-highlights
|
||||
:demand
|
||||
:diminish volatile-highlights-mode
|
||||
:init
|
||||
(volatile-highlights-mode t))
|
||||
:config
|
||||
(volatile-highlights-mode t)
|
||||
(vhl/define-extension 'undo-tree 'undo-tree-yank 'undo-tree-move)
|
||||
(vhl/install-extension 'undo-tree))
|
||||
|
||||
(provide 'siren-volatile-highlights)
|
||||
;;; siren-volatile-highlights.el ends here
|
||||
@@ -6,18 +6,13 @@
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'siren-programming)
|
||||
|
||||
(use-package coffee-mode
|
||||
:mode "\\.coffee\\'"
|
||||
:interpreter "coffee"
|
||||
:hook (coffee-mode . siren-coffee-mode-setup)
|
||||
|
||||
:config
|
||||
(setq coffee-tab-width 2)
|
||||
|
||||
(defun siren-coffee-mode-defaults ()
|
||||
(siren-prog-mode-defaults)
|
||||
|
||||
:init
|
||||
(defun siren-coffee-mode-setup ()
|
||||
;; remove the "Generated by CoffeeScript" header
|
||||
(add-to-list 'coffee-args-compile "--no-header")
|
||||
|
||||
@@ -31,9 +26,8 @@
|
||||
(highlight-indentation-current-column-mode)
|
||||
(subword-mode +1))
|
||||
|
||||
(setq siren-coffee-mode-hook 'siren-coffee-mode-defaults)
|
||||
(add-hook 'coffee-mode-hook (lambda ()
|
||||
(run-hooks 'siren-coffee-mode-hook))))
|
||||
:config
|
||||
(setq coffee-tab-width 2))
|
||||
|
||||
(provide 'siren-coffee)
|
||||
;;; siren-coffee.el ends here
|
||||
37
modules/languages/siren-conf.el
Normal file
37
modules/languages/siren-conf.el
Normal file
@@ -0,0 +1,37 @@
|
||||
;;; siren-conf.el --- jimeh's Emacs Siren: conf-mode configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for conf-mode.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'siren-fci)
|
||||
(require 'siren-flyspell)
|
||||
(require 'siren-linum)
|
||||
(require 'siren-prog-mode)
|
||||
(require 'siren-flycheck)
|
||||
(require 'siren-highlight-indentation)
|
||||
(require 'siren-highlight-symbol)
|
||||
(require 'siren-smartparens)
|
||||
|
||||
(use-package conf-mode
|
||||
:mode "Procfile\\'" "\\.conf\\'" "\\.cfg\\'"
|
||||
:hook (conf-mode . siren-conf-mode-setup)
|
||||
|
||||
:init
|
||||
(defun siren-conf-mode-setup ()
|
||||
(siren-prog-mode-setup)
|
||||
(setq tab-width 2)
|
||||
|
||||
(fci-mode)
|
||||
(flycheck-mode)
|
||||
(flyspell-prog-mode)
|
||||
(highlight-indentation-current-column-mode)
|
||||
(highlight-indentation-set-offset 2)
|
||||
(highlight-symbol-mode)
|
||||
(linum-mode)
|
||||
(smartparens-mode)))
|
||||
|
||||
(provide 'siren-conf)
|
||||
;;; siren-conf.el ends here
|
||||
26
modules/languages/siren-css.el
Normal file
26
modules/languages/siren-css.el
Normal file
@@ -0,0 +1,26 @@
|
||||
;;; siren-css.el --- jimeh's Emacs Siren: css-mode configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for css-mode.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'siren-rainbow)
|
||||
|
||||
(use-package css-mode
|
||||
:mode "\\.css\\'"
|
||||
:hook (css-mode-hook . siren-css-mode-setup)
|
||||
|
||||
:config
|
||||
(setq css-indent-offset 2)
|
||||
|
||||
:init
|
||||
(defun siren-css-mode-setup ()
|
||||
(setq tab-width 2)
|
||||
|
||||
(highlight-indentation-current-column-mode +1)
|
||||
(rainbow-mode +1)))
|
||||
|
||||
(provide 'siren-css)
|
||||
;;; siren-css.el ends here
|
||||
38
modules/languages/siren-cucumber.el
Normal file
38
modules/languages/siren-cucumber.el
Normal file
@@ -0,0 +1,38 @@
|
||||
;;; siren-cucumber.el --- jimeh's Emacs Siren: feature-mode configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for feature-mode.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'siren-fci)
|
||||
(require 'siren-flyspell)
|
||||
(require 'siren-linum)
|
||||
(require 'siren-prog-mode)
|
||||
(require 'siren-flycheck)
|
||||
(require 'siren-highlight-indentation)
|
||||
(require 'siren-highlight-symbol)
|
||||
(require 'siren-smartparens)
|
||||
|
||||
(use-package feature-mode
|
||||
:mode "\\.feature\\'"
|
||||
:interpreter "cucumber"
|
||||
:hook (feature-mode . siren-feature-mode-setup)
|
||||
|
||||
:init
|
||||
(defun siren-feature-mode-setup ()
|
||||
(siren-prog-mode-setup)
|
||||
(setq tab-width 2)
|
||||
|
||||
(fci-mode)
|
||||
(flycheck-mode)
|
||||
(flyspell-prog-mode)
|
||||
(highlight-indentation-current-column-mode)
|
||||
(highlight-indentation-set-offset 2)
|
||||
(highlight-symbol-mode)
|
||||
(linum-mode)
|
||||
(smartparens-mode)))
|
||||
|
||||
(provide 'siren-cucumber)
|
||||
;;; siren-cucumber.el ends here
|
||||
18
modules/languages/siren-dockerfile.el
Normal file
18
modules/languages/siren-dockerfile.el
Normal file
@@ -0,0 +1,18 @@
|
||||
;;; siren-dockerfile.el --- jimeh's Emacs Siren: dockerfile-mode configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for dockerfile-mode.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(use-package dockerfile-mode
|
||||
:mode "Dockerfile.*\\'"
|
||||
:hook (dockerfile-mode . siren-dockerfile-mode-setup)
|
||||
|
||||
:init
|
||||
(defun siren-dockerfile-mode-setup ()
|
||||
(subword-mode +1)))
|
||||
|
||||
(provide 'siren-dockerfile)
|
||||
;;; siren-dockerfile.el ends here
|
||||
@@ -24,7 +24,7 @@
|
||||
(when (and file-name (string-match-p ".*-tests?\\.el\\'" file-name))
|
||||
(setq-local flycheck-checkers '(emacs-lisp)))))
|
||||
|
||||
(defun siren-emacs-lisp-mode-defaults ()
|
||||
(defun siren-emacs-lisp-mode-setup ()
|
||||
"Sensible defaults for `emacs-lisp-mode'."
|
||||
(highlight-indent-guides-mode)
|
||||
;; (run-hooks 'siren-lisp-coding-hook)
|
||||
@@ -35,14 +35,8 @@
|
||||
;; (siren-conditional-emacs-lisp-checker)
|
||||
)
|
||||
|
||||
(setq siren-emacs-lisp-mode-hook 'siren-emacs-lisp-mode-defaults)
|
||||
(add-hook 'emacs-lisp-mode-hook (lambda ()
|
||||
(run-hooks 'siren-emacs-lisp-mode-hook)))
|
||||
|
||||
(add-hook 'emacs-lisp-mode-hook #'siren-emacs-lisp-mode-setup)
|
||||
(add-to-list 'auto-mode-alist '("Cask\\'" . emacs-lisp-mode))
|
||||
|
||||
(eval-after-load "rainbow-mode"
|
||||
'(diminish 'rainbow-mode))
|
||||
|
||||
(provide 'siren-emacs-lisp)
|
||||
;;; siren-emacs-lisp.el ends here
|
||||
17
modules/languages/siren-gitconfig.el
Normal file
17
modules/languages/siren-gitconfig.el
Normal file
@@ -0,0 +1,17 @@
|
||||
;;; siren-gitconfig.el --- jimeh's Emacs Siren: gitconfig-mode configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for gitconfig-mode.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(use-package gitconfig-mode
|
||||
:mode "\\.gitconfig" "gitconfig\\'" "\\.git\\\/config"
|
||||
:hook (gitconfig-mode . siren-gitconfig-mode-setup)
|
||||
|
||||
:init
|
||||
(defun siren-gitconfig-mode-setup ()))
|
||||
|
||||
(provide 'siren-gitconfig)
|
||||
;;; siren-gitconfig.el ends here
|
||||
17
modules/languages/siren-gitignore.el
Normal file
17
modules/languages/siren-gitignore.el
Normal file
@@ -0,0 +1,17 @@
|
||||
;;; siren-gitignore.el --- jimeh's Emacs Siren: gitignore-mode configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for gitignore-mode.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(use-package gitignore-mode
|
||||
:mode "\\.gitignore" "gitignore\\'"
|
||||
:hook (gitignore-mode . siren-gitignore-mode-setup)
|
||||
|
||||
:init
|
||||
(defun siren-gitignore-mode-setup ()))
|
||||
|
||||
(provide 'siren-gitignore)
|
||||
;;; siren-gitignore.el ends here
|
||||
125
modules/languages/siren-golang.el
Normal file
125
modules/languages/siren-golang.el
Normal file
@@ -0,0 +1,125 @@
|
||||
;;; siren-golang.el --- jimeh's Emacs Siren: go-mode configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for go-mode.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'siren-company)
|
||||
(require 'siren-flycheck)
|
||||
(require 'siren-folding)
|
||||
(require 'siren-projectile)
|
||||
|
||||
(use-package go-mode
|
||||
:mode "\\.go\\'"
|
||||
:interpreter "go"
|
||||
:commands go-mode
|
||||
:bind (:map go-mode-map
|
||||
("RET" . newline-and-indent)
|
||||
("C-h f" . godoc-at-point))
|
||||
|
||||
:hook
|
||||
(go-mode . siren-go-mode-setup)
|
||||
|
||||
:init
|
||||
(defun siren-go-mode-setup ()
|
||||
;; Prefer goimports to gofmt if installed
|
||||
(let ((goimports (executable-find "goimports")))
|
||||
(when goimports
|
||||
(setq gofmt-command goimports)))
|
||||
|
||||
;; gofmt on save
|
||||
(add-hook 'before-save-hook 'gofmt-before-save nil t)
|
||||
|
||||
(highlight-symbol-mode -1)
|
||||
(hs-minor-mode 1)
|
||||
(hideshowvis-enable)
|
||||
(whitespace-toggle-options '(tabs))
|
||||
(setq tab-width 4)
|
||||
(subword-mode +1))
|
||||
|
||||
:config
|
||||
(message "loading go-mode")
|
||||
|
||||
(when (memq window-system '(mac ns))
|
||||
(exec-path-from-shell-copy-env "GOPATH"))
|
||||
|
||||
(define-key 'help-command (kbd "G") 'godoc)
|
||||
|
||||
;; Ignore go test -c output files
|
||||
(add-to-list 'completion-ignored-extensions ".test"))
|
||||
|
||||
(use-package company-go
|
||||
:defer t
|
||||
:after go-mode
|
||||
:hook (go-mode . siren-company-go-setup)
|
||||
|
||||
:init
|
||||
(defun siren-company-go-setup ()
|
||||
(set (make-local-variable 'company-backends) '(company-go))
|
||||
(company-mode +1)))
|
||||
|
||||
(use-package go-eldoc
|
||||
:defer t
|
||||
:diminish eldoc-mode
|
||||
:commands go-eldoc-setup
|
||||
:hook (go-mode . go-eldoc-setup))
|
||||
|
||||
(use-package go-guru
|
||||
:after go-mode
|
||||
:bind (:map go-mode-map
|
||||
("C-c C-j" . go-guru-definition)
|
||||
("C-c b" . pop-tag-mark))
|
||||
:hook (go-mode . siren-go-guru-setup)
|
||||
|
||||
:init
|
||||
(defun siren-go-guru-setup ()
|
||||
(setq go-guru-hl-identifier-idle-time 0.1)
|
||||
(go-guru-hl-identifier-mode 1))
|
||||
|
||||
:config
|
||||
(custom-set-faces
|
||||
'(go-guru-hl-identifier-face ((t (:background "gray30"))))))
|
||||
|
||||
(use-package go-rename
|
||||
:after go-mode
|
||||
:bind (:map go-mode-map
|
||||
("C-c ." . go-rename)))
|
||||
|
||||
(use-package gotest
|
||||
:after go-mode
|
||||
:bind (:map go-mode-map
|
||||
("C-c , a" . go-test-current-project)
|
||||
("C-c , v" . go-test-current-file)
|
||||
("C-c , s" . go-test-current-test)
|
||||
("C-c , c" . go-test-current-coverage)
|
||||
("C-c , b" . go-test-current-benchmark)
|
||||
("C-c , B" . go-test-current-project-benchmarks)
|
||||
("C-c , r" . go-run)))
|
||||
|
||||
(use-package go-projectile
|
||||
:after go-mode
|
||||
:hook (go-mode . siren-go-projectile-setup)
|
||||
|
||||
:init
|
||||
(defun siren-go-projectile-setup ()
|
||||
;; prevent go-projectile from screwing up GOPATH
|
||||
(setq go-projectile-switch-gopath 'never)))
|
||||
|
||||
(use-package flycheck-gometalinter
|
||||
:defer t
|
||||
:after go-mode
|
||||
:commands flycheck-gometalinter-setup
|
||||
:hook (flycheck-mode . flycheck-gometalinter-setup)
|
||||
|
||||
:init
|
||||
(setq flycheck-gometalinter-fast t
|
||||
flycheck-gometalinter-tests t
|
||||
flycheck-gometalinter-vendor t))
|
||||
|
||||
(use-package go-playground
|
||||
:commands go-playground)
|
||||
|
||||
(provide 'siren-golang)
|
||||
;;; siren-golang.el ends here
|
||||
@@ -8,16 +8,13 @@
|
||||
|
||||
(use-package haml-mode
|
||||
:mode "\\.haml\\'" "\\.hamlc\\'"
|
||||
:hook (haml-mode . siren-haml-mode-setup)
|
||||
|
||||
:config
|
||||
(defun siren-haml-mode-defaults ()
|
||||
(siren-prog-mode-defaults)
|
||||
:init
|
||||
(defun siren-haml-mode-setup ()
|
||||
(setq tab-width 2)
|
||||
(highlight-indentation-set-offset 2)
|
||||
(highlight-indentation-current-column-mode))
|
||||
|
||||
(setq siren-haml-mode-hook 'siren-haml-mode-defaults)
|
||||
(add-hook 'haml-mode-hook (lambda () (run-hooks 'siren-haml-mode-hook))))
|
||||
(highlight-indentation-current-column-mode +1)))
|
||||
|
||||
(provide 'siren-haml)
|
||||
;;; siren-haml.el ends here
|
||||
42
modules/languages/siren-js.el
Normal file
42
modules/languages/siren-js.el
Normal file
@@ -0,0 +1,42 @@
|
||||
;;; siren-js.el --- jimeh's Emacs Siren: js-mode configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for js-mode.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'siren-prettier-js)
|
||||
(require 'siren-folding)
|
||||
|
||||
(use-package js-mode
|
||||
:ensure nil ;; loaded from emacs built-ins
|
||||
:mode
|
||||
"\\.js\\'"
|
||||
"\\.pac\\'"
|
||||
"node"
|
||||
|
||||
:hook
|
||||
(js-mode . siren-js-mode-setup)
|
||||
|
||||
:init
|
||||
(defun siren-js-mode-setup ()
|
||||
"Default tweaks for `js-mode'."
|
||||
(let ((width 2))
|
||||
(setq js-indent-level width
|
||||
indent-level width
|
||||
tab-width width))
|
||||
|
||||
(prettier-js-mode)
|
||||
(company-mode +1)
|
||||
(subword-mode +1)
|
||||
(hs-minor-mode 1)
|
||||
(highlight-indentation-current-column-mode)
|
||||
(hideshowvis-enable)
|
||||
|
||||
(let ((map js-mode-map))
|
||||
(define-key map (kbd "C-j") 'newline-and-indent)
|
||||
(define-key map (kbd "C-c C-h") 'siren-toggle-hiding))))
|
||||
|
||||
(provide 'siren-js)
|
||||
;;; siren-js.el ends here
|
||||
36
modules/languages/siren-json.el
Normal file
36
modules/languages/siren-json.el
Normal file
@@ -0,0 +1,36 @@
|
||||
;;; siren-json.el --- jimeh's Emacs Siren: json-mode configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for json-mode.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'siren-eslintd-fix)
|
||||
(require 'siren-folding)
|
||||
|
||||
(use-package json-mode
|
||||
:mode "\\.json\\'"
|
||||
:requires (flycheck highlight-indentation omnifmt hideshowvis)
|
||||
|
||||
:bind (:map json-mode-map
|
||||
("C-j" . newline-and-indent)
|
||||
("C-c C-h" . siren-toggle-hiding))
|
||||
|
||||
:hook
|
||||
(json-mode . siren-json-mode-setup)
|
||||
|
||||
:init
|
||||
(defun siren-json-mode-setup ()
|
||||
"Default tweaks for `json-mode'."
|
||||
|
||||
(let ((width 2))
|
||||
(setq js-indent-level width)
|
||||
(setq json-reformat:indent-width width)
|
||||
(setq tab-width width)
|
||||
(highlight-indentation-set-offset width))
|
||||
|
||||
(setq flycheck-checker 'json-jsonlint)))
|
||||
|
||||
(provide 'siren-json)
|
||||
;;; siren-js.el ends here
|
||||
26
modules/languages/siren-jsx.el
Normal file
26
modules/languages/siren-jsx.el
Normal file
@@ -0,0 +1,26 @@
|
||||
;;; siren-jsx.el --- jimeh's Emacs Siren: .jsx file configuration
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for dealing with .jsx files.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'siren-prettier-js)
|
||||
|
||||
(use-package rjsx-mode
|
||||
:mode "components\\/.*\\.js\\'"
|
||||
|
||||
:hook (rjsx-mode . siren-rjsx-mode-setup)
|
||||
|
||||
:init
|
||||
(defun siren-rjsx-mode-setup ()
|
||||
(prettier-js-mode +1)
|
||||
(company-mode +1)
|
||||
(subword-mode +1)
|
||||
(hs-minor-mode +1)
|
||||
(highlight-indentation-current-column-mode +1)
|
||||
(hideshowvis-enable)))
|
||||
|
||||
(provide 'siren-jsx)
|
||||
;;; siren-jsx.el ends here
|
||||
@@ -6,6 +6,8 @@
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'siren-highlight-indent-guides)
|
||||
|
||||
;; Lisp configuration
|
||||
(define-key read-expression-map (kbd "TAB") 'completion-at-point)
|
||||
|
||||
22
modules/languages/siren-lua.el
Normal file
22
modules/languages/siren-lua.el
Normal file
@@ -0,0 +1,22 @@
|
||||
;;; siren-lua.el --- jimeh's Emacs Siren: lua-mode configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for lua-mode.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(use-package lua-mode
|
||||
:hook
|
||||
(lua-mode . siren-lua-mode-setup)
|
||||
|
||||
:init
|
||||
(defun siren-lua-mode-setup ()
|
||||
(setq lua-indent-level 2
|
||||
whitespace-action '(auto-cleanup))
|
||||
|
||||
(highlight-indentation-current-column-mode)
|
||||
(subword-mode +1)))
|
||||
|
||||
(provide 'siren-lua)
|
||||
;;; siren-lua.el ends here
|
||||
23
modules/languages/siren-makefile.el
Normal file
23
modules/languages/siren-makefile.el
Normal file
@@ -0,0 +1,23 @@
|
||||
;;; siren-makefile.el --- jimeh's Emacs Siren: makefile-mode configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for makefile-mode.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(use-package make-mode
|
||||
:ensure nil ;; loaded from emacs built-ins
|
||||
:hook
|
||||
(makefile-mode-hook . siren-makefile-mode-setup)
|
||||
|
||||
:init
|
||||
(add-to-list 'siren-indent-sensitive-modes 'makefile-mode)
|
||||
(defun siren-makefile-mode-setup ()
|
||||
(subword-mode +1)
|
||||
(setq tab-width 4)
|
||||
(highlight-indentation-set-offset 4)
|
||||
(highlight-indentation-current-column-mode)))
|
||||
|
||||
(provide 'siren-makefile)
|
||||
;;; siren-makefile.el ends here
|
||||
@@ -6,7 +6,9 @@
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'siren-fci)
|
||||
(require 'siren-flyspell)
|
||||
(require 'siren-linum)
|
||||
(require 'siren-smartparens)
|
||||
|
||||
(use-package markdown-mode
|
||||
@@ -17,28 +19,27 @@
|
||||
"\\.mdown"
|
||||
"\\.markdown"
|
||||
|
||||
:bind (:map markdown-mode-map
|
||||
("C-c p" . markdown-preview))
|
||||
|
||||
:hook
|
||||
(markdown-mode . siren-markdown-mode-setup)
|
||||
|
||||
:init
|
||||
(defun siren-markdown-mode-setup ()
|
||||
(setq markdown-asymmetric-header t
|
||||
whitespace-action nil)
|
||||
|
||||
(auto-fill-mode)
|
||||
(fci-mode)
|
||||
(flyspell-mode)
|
||||
(linum-mode t)
|
||||
(smartparens-mode +1)
|
||||
(subword-mode))
|
||||
|
||||
:config
|
||||
(setq markdown-command "redcarpet")
|
||||
|
||||
(defun siren-markdown-mode-defaults ()
|
||||
(setq whitespace-action nil
|
||||
fill-column 80
|
||||
markdown-asymmetric-header t)
|
||||
|
||||
(fci-mode)
|
||||
(linum-mode t)
|
||||
(flyspell-mode)
|
||||
(auto-fill-mode)
|
||||
(smartparens-mode +1)
|
||||
(subword-mode)
|
||||
(define-key markdown-mode-map (kbd "C-c p") 'markdown-preview))
|
||||
|
||||
(setq siren-markdown-mode-hook 'siren-markdown-mode-defaults)
|
||||
(add-hook 'markdown-mode-hook (lambda ()
|
||||
(run-hooks 'siren-markdown-mode-hook))))
|
||||
|
||||
(custom-set-faces
|
||||
'(markdown-code-face ((t nil))))
|
||||
(custom-set-faces '(markdown-code-face ((t nil)))))
|
||||
|
||||
(provide 'siren-markdown)
|
||||
;;; siren-markdown.el ends here
|
||||
43
modules/languages/siren-org-mode.el
Normal file
43
modules/languages/siren-org-mode.el
Normal file
@@ -0,0 +1,43 @@
|
||||
;;; siren-org-mode.el --- jimeh's Emacs Siren: org-mode configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for org-mode.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'siren-fci)
|
||||
(require 'siren-flyspell)
|
||||
(require 'siren-linum)
|
||||
(require 'siren-smartparens)
|
||||
|
||||
(use-package org-mode
|
||||
:ensure nil ;; loaded from emacs built-ins
|
||||
:hook (org-mode-hook . siren-org-mode-setup)
|
||||
|
||||
:init
|
||||
(defun siren-org-mode-setup ()
|
||||
(setq org-export-backends '(ascii html icalendar latex md confluence)
|
||||
fill-column 80
|
||||
whitespace-action '(auto-cleanup))
|
||||
|
||||
(linum-mode t)
|
||||
(flyspell-mode)
|
||||
(fci-mode)
|
||||
(smartparens-mode +1)
|
||||
(visual-line-mode +1)
|
||||
(whitespace-mode +1)
|
||||
(let ((map org-mode-map))
|
||||
(define-key map (kbd "M-[") 'org-promote-subtree)
|
||||
(define-key map (kbd "M-]") 'org-demote-subtree)
|
||||
(define-key map (kbd "M-p") 'org-metaup)
|
||||
(define-key map (kbd "M-n") 'org-metadown)
|
||||
(define-key map (kbd "C-M-n") 'outline-next-visible-heading)
|
||||
(define-key map (kbd "C-M-p") 'outline-previous-visible-heading))))
|
||||
|
||||
(use-package org-mouse
|
||||
:ensure nil ;; loaded from emacs built-ins
|
||||
:after org-mode)
|
||||
|
||||
(provide 'siren-org-mode)
|
||||
;;; siren-org-mode.el ends here
|
||||
@@ -6,23 +6,24 @@
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'siren-programming)
|
||||
(require 'siren-folding)
|
||||
(require 'siren-highlight-indentation)
|
||||
(require 'siren-rainbow)
|
||||
|
||||
(use-package php-mode
|
||||
:config
|
||||
(defun siren-php-mode-defaults ()
|
||||
(siren-prog-mode-defaults)
|
||||
:interpreter "php"
|
||||
:mode "\\.php\\'" "\\.inc\\'" "\\.module\\'"
|
||||
:hook
|
||||
(php-mode . siren-php-mode-setup)
|
||||
|
||||
:init
|
||||
(defun siren-php-mode-setup ()
|
||||
(rainbow-mode +1)
|
||||
(company-mode +1)
|
||||
(subword-mode +1)
|
||||
(highlight-indentation-current-column-mode)
|
||||
(hs-minor-mode 1)
|
||||
(hideshowvis-enable))
|
||||
|
||||
(setq siren-php-mode-hook 'siren-php-mode-defaults)
|
||||
(add-hook 'php-mode-hook (lambda ()
|
||||
(run-hooks 'siren-php-mode-hook))))
|
||||
(hideshowvis-enable)))
|
||||
|
||||
(provide 'siren-php)
|
||||
;;; siren-php.el ends here
|
||||
25
modules/languages/siren-plantuml.el
Normal file
25
modules/languages/siren-plantuml.el
Normal file
@@ -0,0 +1,25 @@
|
||||
;;; siren-plantuml.el --- jimeh's Emacs Siren: plantuml-mode configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for plantuml-mode.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'siren-highlight-indentation)
|
||||
|
||||
(use-package plantuml-mode
|
||||
:mode "\\.uml\\'"
|
||||
:hook
|
||||
(plantuml-mode . siren-plantuml-mode-setup)
|
||||
|
||||
:init
|
||||
(defun siren-plantuml-mode-setup ()
|
||||
(setq tab-width 2
|
||||
plantuml-jar-path "/usr/local/opt/plantuml/libexec/plantuml.jar")
|
||||
|
||||
(highlight-indentation-set-offset 2)
|
||||
(highlight-indentation-current-column-mode)))
|
||||
|
||||
(provide 'siren-plantuml)
|
||||
;;; siren-plantuml.el ends here
|
||||
24
modules/languages/siren-prog-mode.el
Normal file
24
modules/languages/siren-prog-mode.el
Normal file
@@ -0,0 +1,24 @@
|
||||
;;; siren-prog-mode.el --- jimeh's Emacs Siren: defaults for programming modes
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration shared across all programming languages.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(use-package prog-mode
|
||||
:ensure nil ;; loaded from emacs built-ins
|
||||
:hook
|
||||
(prog-mode . siren-prog-mode-setup)
|
||||
|
||||
:init
|
||||
(defun siren-prog-mode-setup ()
|
||||
"Default coding hook, useful with any programming language."
|
||||
(setq fill-column 80
|
||||
whitespace-action '(auto-cleanup))
|
||||
|
||||
(visual-line-mode +1)
|
||||
(whitespace-mode +1)))
|
||||
|
||||
(provide 'siren-prog-mode)
|
||||
;;; siren-prog-mode.el ends here
|
||||
159
modules/languages/siren-ruby.el
Normal file
159
modules/languages/siren-ruby.el
Normal file
@@ -0,0 +1,159 @@
|
||||
;;; siren-ruby.el --- jimeh's Emacs Siren: ruby-mode configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for ruby-mode.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'siren-company)
|
||||
(require 'siren-folding)
|
||||
(require 'siren-highlight-indentation)
|
||||
(require 'siren-smartparens)
|
||||
(require 'siren-toggle-quotes)
|
||||
|
||||
(require 'smartparens-ruby)
|
||||
|
||||
(use-package ruby-mode
|
||||
:ensure nil ;; loaded from emacs built-ins
|
||||
:interpreter "ruby"
|
||||
:mode
|
||||
"Appraisals\\'"
|
||||
"Berksfile\\'"
|
||||
"Capfile\\'"
|
||||
"Gemfile\\'"
|
||||
"Guardfile\\'"
|
||||
"Podfile\\'"
|
||||
"Puppetfile\\'"
|
||||
"Rakefile\\'"
|
||||
"Thorfile\\'"
|
||||
"Vagrantfile\\'"
|
||||
"\\.cap\\'"
|
||||
"\\.gemspec\\'"
|
||||
"\\.jbuilder\\'"
|
||||
"\\.podspec\\'"
|
||||
"\\.rabl\\'"
|
||||
"\\.rake\\'"
|
||||
"\\.ru\\'"
|
||||
"\\.thor\\'"
|
||||
"\\.rb\\'"
|
||||
|
||||
:bind (:map ruby-mode-map
|
||||
("C-j" . newline-and-indent)
|
||||
("RET" . newline-and-indent)
|
||||
("C-c C-l" . goto-line)
|
||||
("C-M-f" . sp-ruby-forward-sexp)
|
||||
("C-M-b" . sp-ruby-backward-sexp))
|
||||
|
||||
:hook
|
||||
(ruby-mode . siren-ruby-mode-setup)
|
||||
|
||||
:init
|
||||
(defun siren-ruby-mode-setup ()
|
||||
(setq c-tab-always-indent nil
|
||||
ruby-align-chained-calls t
|
||||
ruby-insert-encoding-magic-comment t
|
||||
ruby-use-smie t
|
||||
tab-width 2)
|
||||
|
||||
(company-mode +1)
|
||||
(hs-minor-mode 1)
|
||||
(hideshowvis-enable)
|
||||
(highlight-indentation-current-column-mode)
|
||||
(subword-mode +1))
|
||||
|
||||
:config
|
||||
;; We never want to edit Rubinius bytecode
|
||||
(add-to-list 'completion-ignored-extensions ".rbc")
|
||||
|
||||
;; Set up hs-mode (HideShow) for Ruby
|
||||
(add-to-list 'hs-special-modes-alist
|
||||
`(ruby-mode
|
||||
,(rx (or "def" "class" "module" "do" "if" "case")) ;; Block start
|
||||
,(rx (or "end")) ;; Block end
|
||||
,(rx (or "#" "=begin")) ;; Comment start
|
||||
ruby-forward-sexp nil))
|
||||
|
||||
;; Make company-mode play nice
|
||||
(push 'ruby-mode company-dabbrev-code-modes))
|
||||
|
||||
(use-package inf-ruby
|
||||
:defer t
|
||||
:hook
|
||||
(ruby-mode . inf-ruby-minor-mode)
|
||||
(compilation-filter . inf-ruby-auto-enter)
|
||||
:config
|
||||
(unbind-key "C-c C-r" inf-ruby-minor-mode-map))
|
||||
|
||||
(use-package robe
|
||||
:defer t
|
||||
:bind (:map robe-mode-map
|
||||
("C-c C-j" . robe-jump)
|
||||
("C-c b". pop-tag-mark))
|
||||
:hook (ruby-mode . robe-mode)
|
||||
|
||||
:init
|
||||
(eval-after-load 'company
|
||||
'(push 'company-robe company-backends))
|
||||
|
||||
:config
|
||||
;; Unbind keys used by siren-expand-region module.
|
||||
(unbind-key "M-." robe-mode-map)
|
||||
(unbind-key "M-," robe-mode-map))
|
||||
|
||||
(use-package rspec-mode
|
||||
:defer t
|
||||
:hook (rspec-mode . siren-rspec-mode-setup)
|
||||
:init
|
||||
(defun siren-rspec-mode-setup ()
|
||||
(setq compilation-scroll-output t
|
||||
rspec-primary-source-dirs '("app")
|
||||
rspec-use-spring-when-possible nil))
|
||||
|
||||
:config
|
||||
(rspec-install-snippets))
|
||||
|
||||
(use-package rubocopfmt
|
||||
:ensure nil ;; loaded from vendor
|
||||
:commands (rubocopfmt rubocopfmt-mode)
|
||||
:bind (:map ruby-mode-map
|
||||
("C-c C-f" . rubocopfmt))
|
||||
:hook (ruby-mode . rubocopfmt-mode))
|
||||
|
||||
(use-package ruby-compilation
|
||||
:defer t)
|
||||
|
||||
(use-package ruby-refactor
|
||||
:defer t
|
||||
:hook
|
||||
(ruby-mode . ruby-refactor-mode)
|
||||
(ruby-refactor . siren-ruby-refactor-setup)
|
||||
|
||||
:init
|
||||
(setq ruby-refactor-keymap-prefix (kbd "C-c C-="))
|
||||
(defun siren-ruby-refactor-setup ()
|
||||
(setq ruby-refactor-add-parens t)))
|
||||
|
||||
(use-package ruby-tools
|
||||
:defer t
|
||||
:diminish ruby-tools-mode
|
||||
:bind (:map ruby-tools-mode-map
|
||||
("C-'" . toggle-quotes))
|
||||
:hook
|
||||
(ruby-mode . ruby-tools-mode)
|
||||
|
||||
:config
|
||||
;; Unbind key used by siren-resize-window module.
|
||||
(unbind-key "C-;" ruby-tools-mode-map))
|
||||
|
||||
(use-package seeing-is-believing
|
||||
:defer t
|
||||
:commands seeing-is-believing)
|
||||
|
||||
(use-package yari
|
||||
:defer t
|
||||
:init
|
||||
(define-key 'help-command (kbd "R") 'yari))
|
||||
|
||||
(provide 'siren-ruby)
|
||||
;;; siren-ruby.el ends here
|
||||
56
modules/languages/siren-rust.el
Normal file
56
modules/languages/siren-rust.el
Normal file
@@ -0,0 +1,56 @@
|
||||
;;; siren-rust.el --- jimeh's Emacs Siren: rust-mode configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for rust-mode.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'siren-folding)
|
||||
(require 'siren-highlight-indentation)
|
||||
|
||||
(use-package rust-mode
|
||||
:mode "\\.rs\\'"
|
||||
:interpreter "rust"
|
||||
:commands rust-mode
|
||||
:bind (:map rust-mode-map
|
||||
("RET" . newline-and-indent))
|
||||
|
||||
:hook
|
||||
(rust-mode . siren-rust-mode-setup)
|
||||
|
||||
:init
|
||||
(defun siren-rust-mode-setup ()
|
||||
(setq rust-format-on-save t)
|
||||
|
||||
(hs-minor-mode 1)
|
||||
(hideshowvis-enable)
|
||||
(highlight-indentation-current-column-mode)
|
||||
(subword-mode +1)))
|
||||
|
||||
(use-package cargo
|
||||
:hook (rust-mode . cargo-minor-mode))
|
||||
|
||||
(use-package flycheck-rust
|
||||
:after rust-mode
|
||||
:hook (flycheck-mode . flycheck-rust-setup))
|
||||
|
||||
(use-package racer
|
||||
:requires rust-mode company
|
||||
:commands racer-mode
|
||||
:bind (:map rust-mode-map
|
||||
("TAB" . company-indent-or-complete-common))
|
||||
|
||||
:hook
|
||||
(rust-mode . racer-mode)
|
||||
(racer-mode . eldoc-mode)
|
||||
(racer-mode . siren-racer-mode-setup)
|
||||
|
||||
:config
|
||||
(defun siren-racer-mode-setup ()
|
||||
(setq company-tooltip-align-annotations t)))
|
||||
|
||||
(use-package rust-playground)
|
||||
|
||||
(provide 'siren-rust)
|
||||
;;; siren-rust.el ends here
|
||||
@@ -10,16 +10,15 @@
|
||||
|
||||
(use-package sass-mode
|
||||
:mode "\\.sass\\'"
|
||||
:hook (sass-mode . siren-sass-mode-setup)
|
||||
|
||||
:init
|
||||
(defun siren-sass-mode-setup ()
|
||||
(siren-css-mode-css))
|
||||
|
||||
:config
|
||||
;; turn off annoying auto-compile on save
|
||||
(setq sass-compile-at-save nil)
|
||||
|
||||
(defun siren-sass-mode-defaults ()
|
||||
(siren-css-mode-defaults))
|
||||
|
||||
(setq siren-sass-mode-hook 'siren-sass-mode-defaults)
|
||||
(add-hook 'sass-mode-hook (lambda () (run-hooks 'siren-sass-mode-hook))))
|
||||
(setq sass-compile-at-save nil))
|
||||
|
||||
(provide 'siren-sass)
|
||||
;;; siren-sass.el ends here
|
||||
@@ -10,16 +10,15 @@
|
||||
|
||||
(use-package scss-mode
|
||||
:mode "\\.scss\\'"
|
||||
:hook (scss-mode-hook . siren-scss-mode-setup)
|
||||
|
||||
:init
|
||||
(defun siren-scss-mode-setup ()
|
||||
(siren-css-mode-setup))
|
||||
|
||||
:config
|
||||
;; turn off annoying auto-compile on save
|
||||
(setq scss-compile-at-save nil)
|
||||
|
||||
(defun siren-scss-mode-defaults ()
|
||||
(siren-css-mode-defaults))
|
||||
|
||||
(setq siren-scss-mode-hook 'siren-scss-mode-defaults)
|
||||
(add-hook 'scss-mode-hook (lambda () (run-hooks 'siren-scss-mode-hook))))
|
||||
(setq scss-compile-at-save nil))
|
||||
|
||||
(provide 'siren-scss)
|
||||
;;; siren-scss.el ends here
|
||||
29
modules/languages/siren-sh.el
Normal file
29
modules/languages/siren-sh.el
Normal file
@@ -0,0 +1,29 @@
|
||||
;;; siren-sh.el --- jimeh's Emacs Siren: sh-mode configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for sh-mode.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'siren-highlight-indentation)
|
||||
|
||||
(use-package sh-script
|
||||
:ensure nil ;; loaded from emacs built-ins
|
||||
:hook
|
||||
(sh-mode-hook . siren-sh-mode-setup)
|
||||
|
||||
:init
|
||||
(defun siren-sh-mode-setup ()
|
||||
(setq tab-width 2
|
||||
sh-basic-offset 2
|
||||
sh-indentation 2
|
||||
whitespace-action '(auto-cleanup))
|
||||
|
||||
(subword-mode +1)
|
||||
(highlight-indentation-set-offset 2)
|
||||
(highlight-indentation-current-column-mode)
|
||||
(define-key sh-mode-map (kbd "RET") 'newline-and-indent)))
|
||||
|
||||
(provide 'siren-sh)
|
||||
;;; siren-sh.el ends here
|
||||
20
modules/languages/siren-slim.el
Normal file
20
modules/languages/siren-slim.el
Normal file
@@ -0,0 +1,20 @@
|
||||
;;; siren-slim.el --- jimeh's Emacs Siren: slim-mode configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for slim-mode.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'siren-highlight-indentation)
|
||||
|
||||
(use-package slim-mode
|
||||
:mode "\\.slim\\'"
|
||||
:hook (slim-mode-hook . siren-slim-mode-hook)
|
||||
|
||||
:init
|
||||
(defun siren-slim-mode-setup ()
|
||||
(highlight-indentation-current-column-mode)))
|
||||
|
||||
(provide 'siren-slim)
|
||||
;;; siren-slim.el ends here
|
||||
17
modules/languages/siren-text-mode.el
Normal file
17
modules/languages/siren-text-mode.el
Normal file
@@ -0,0 +1,17 @@
|
||||
;;; siren-text-mode.el --- jimeh's Emacs Siren: text-mode configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for text-mode.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(use-package text-mode
|
||||
:ensure nil ;; loaded from emacs built-ins
|
||||
:hook (text-mode . siren-text-mode-setup)
|
||||
:init
|
||||
(defun siren-text-mode-setup ()
|
||||
(setq fill-column 80)))
|
||||
|
||||
(provide 'siren-text-mode)
|
||||
;;; siren-text-mode.el ends here
|
||||
38
modules/languages/siren-thrift.el
Normal file
38
modules/languages/siren-thrift.el
Normal file
@@ -0,0 +1,38 @@
|
||||
;;; siren-thrift.el --- jimeh's Emacs Siren: thrift-mode configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for thrift-mode.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'siren-fci)
|
||||
(require 'siren-flyspell)
|
||||
(require 'siren-linum)
|
||||
(require 'siren-prog-mode)
|
||||
(require 'siren-flycheck)
|
||||
(require 'siren-highlight-indentation)
|
||||
(require 'siren-highlight-symbol)
|
||||
(require 'siren-smartparens)
|
||||
|
||||
(use-package thrift
|
||||
:mode "\\.thrift\\'"
|
||||
:hook (thrift-mode-hook . siren-thrift-mode-setup)
|
||||
|
||||
:init
|
||||
(defun siren-thrift-mode-setup ()
|
||||
(siren-prog-mode-setup)
|
||||
(setq tab-width 2)
|
||||
|
||||
(fci-mode)
|
||||
(flycheck-mode)
|
||||
(flyspell-prog-mode)
|
||||
(highlight-indentation-current-column-mode)
|
||||
(highlight-indentation-set-offset 2)
|
||||
(highlight-symbol-mode)
|
||||
(linum-mode)
|
||||
(smartparens-mode)
|
||||
(subword-mode +1)))
|
||||
|
||||
(provide 'siren-thrift)
|
||||
;;; siren-thrift.el ends here
|
||||
@@ -6,36 +6,41 @@
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'siren-programming)
|
||||
(require 'siren-company)
|
||||
(require 'siren-fci)
|
||||
(require 'siren-folding)
|
||||
(require 'siren-highlight-indentation)
|
||||
|
||||
(use-package web-mode
|
||||
:mode
|
||||
"\\.html\\'"
|
||||
"\\.html.erb\\'"
|
||||
|
||||
:config
|
||||
(setq web-mode-code-indent-offset 2
|
||||
web-mode-css-indent-offset 2
|
||||
web-mode-markup-indent-offset 2
|
||||
web-mode-sql-indent-offset 2)
|
||||
:bind (:map web-mode-map
|
||||
("C-j" . newline-and-indent)
|
||||
("C-c C-h" . siren-toggle-hiding))
|
||||
|
||||
(defun siren-web-mode-mode-hook ()
|
||||
:hook
|
||||
(web-mode-hook . siren-web-mode-setup)
|
||||
|
||||
:init
|
||||
(defun siren-web-mode-mode-setup ()
|
||||
"Default tweaks for `web-mode'."
|
||||
(setq tab-width 2)
|
||||
|
||||
(siren-prog-mode-defaults)
|
||||
(company-mode +1)
|
||||
(fci-mode -1)
|
||||
(hideshowvis-enable)
|
||||
(hs-minor-mode +1)
|
||||
(highlight-indentation-current-column-mode)
|
||||
(highlight-indentation-set-offset 2)
|
||||
(subword-mode +1)
|
||||
(let ((map web-mode-map))
|
||||
(define-key map (kbd "C-j") 'newline-and-indent)
|
||||
(define-key map (kbd "C-c C-h") 'siren-toggle-hiding)))
|
||||
(subword-mode +1))
|
||||
|
||||
(add-hook 'web-mode-hook 'siren-web-mode-mode-hook))
|
||||
:config
|
||||
(setq web-mode-code-indent-offset 2
|
||||
web-mode-css-indent-offset 2
|
||||
web-mode-markup-indent-offset 2
|
||||
web-mode-sql-indent-offset 2))
|
||||
|
||||
(provide 'siren-web-mode)
|
||||
;;; siren-web-mode.el ends here
|
||||
39
modules/languages/siren-yaml.el
Normal file
39
modules/languages/siren-yaml.el
Normal file
@@ -0,0 +1,39 @@
|
||||
;;; siren-yaml.el --- jimeh's Emacs Siren: yaml-mode configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for yaml-mode.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'siren-fci)
|
||||
(require 'siren-flyspell)
|
||||
(require 'siren-highlight-indentation)
|
||||
(require 'siren-linum)
|
||||
(require 'siren-prog-mode)
|
||||
(require 'siren-smartparens)
|
||||
|
||||
(use-package yaml-mode
|
||||
:mode "\\.yml\\'" "\\.yaml\\'"
|
||||
:bind (:map yaml-mode-map
|
||||
("RET" . newline-and-indent))
|
||||
|
||||
:hook
|
||||
(yaml-mode . siren-yaml-mode-setup)
|
||||
|
||||
:init
|
||||
(defun siren-yaml-mode-setup ()
|
||||
(siren-prog-mode-setup)
|
||||
(setq tab-width 2
|
||||
whitespace-action '(auto-cleanup))
|
||||
|
||||
(fci-mode)
|
||||
(flyspell-mode)
|
||||
(highlight-indentation-current-column-mode)
|
||||
(highlight-indentation-set-offset 2)
|
||||
(linum-mode t)
|
||||
(smartparens-mode +1)
|
||||
(subword-mode +1)))
|
||||
|
||||
(provide 'siren-yaml)
|
||||
;;; siren-yaml.el ends here
|
||||
13
modules/linting/siren-eslintd-fix.el
Normal file
13
modules/linting/siren-eslintd-fix.el
Normal file
@@ -0,0 +1,13 @@
|
||||
;;; siren-eslintd-fix.el --- jimeh's Emacs Siren: eslintd-fix configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for eslintd-fix.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(use-package eslintd-fix
|
||||
:defer t)
|
||||
|
||||
(provide 'siren-eslintd-fix)
|
||||
;;; siren-eslintd-fix.el ends here
|
||||
@@ -7,6 +7,7 @@
|
||||
;;; Code:
|
||||
|
||||
(use-package flycheck
|
||||
:hook (prog-mode . flycheck-mode)
|
||||
:config
|
||||
(setq flycheck-completion-system 'ido
|
||||
flycheck-idle-change-delay 1.0
|
||||
16
modules/linting/siren-prettier-js.el
Normal file
16
modules/linting/siren-prettier-js.el
Normal file
@@ -0,0 +1,16 @@
|
||||
;;; siren-prettier-js.el --- jimeh's Emacs Siren: prettier-js configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for prettier-js package
|
||||
|
||||
;;; Code:
|
||||
|
||||
(use-package prettier-js
|
||||
:hook (prettier-js-mode . siren-prettier-js-mode-setup)
|
||||
|
||||
:init
|
||||
(defun siren-prettier-js-mode-setup ()))
|
||||
|
||||
(provide 'siren-prettier-js)
|
||||
;;; siren-prettier-js.el ends here
|
||||
@@ -8,6 +8,15 @@
|
||||
|
||||
(use-package rubocop
|
||||
:defer t
|
||||
:bind (:map rubocop-mode-map
|
||||
("C-c C-f" . siren-rubocop-autocorrect))
|
||||
|
||||
:hook
|
||||
(rubocop-mode . siren-rubocop-mode-setup)
|
||||
(after-save . siren-rubocop-autocorrect-hook)
|
||||
|
||||
:init
|
||||
(defun siren-rubocop-mode-setup ())
|
||||
|
||||
:config
|
||||
(defgroup siren-rubocop nil
|
||||
@@ -56,17 +65,7 @@ auto-correction is triggered."
|
||||
(defun siren-rubocop-autocorrect-hook ()
|
||||
"Siren's Rubocop auto-correct hook."
|
||||
(if siren-rubocop-autocorrect-on-save
|
||||
(siren-rubocop-autocorrect-p nil)))
|
||||
|
||||
(defun siren-rubocop-mode-defaults ()
|
||||
(add-hook 'after-save-hook 'siren-rubocop-autocorrect-hook nil t)
|
||||
|
||||
(let ((map rubocop-mode-map))
|
||||
(define-key map (kbd "C-c C-f") 'siren-rubocop-autocorrect)))
|
||||
|
||||
(setq siren-rubocop-mode-hook 'siren-rubocop-mode-defaults)
|
||||
(add-hook 'rubocop-mode-hook (lambda ()
|
||||
(run-hooks 'siren-rubocop-mode-hook))))
|
||||
(siren-rubocop-autocorrect-p nil))))
|
||||
|
||||
(provide 'siren-rubocop)
|
||||
;;; siren-rubocop.el ends here
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
(use-package avy
|
||||
:bind
|
||||
("C-c C-j" . avy-goto-word-or-subword-1)
|
||||
("C-c j" . avy-goto-word-or-subword-1)
|
||||
("C-c SPC" . avy-goto-char)
|
||||
("M-o" . ace-window)
|
||||
|
||||
27
modules/navigation/siren-dired.el
Normal file
27
modules/navigation/siren-dired.el
Normal file
@@ -0,0 +1,27 @@
|
||||
;;; siren-dired.el --- jimeh's Emacs Siren: dired configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for dired.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'siren-linum)
|
||||
|
||||
(use-package dired+
|
||||
:ensure nil ;; loaded from vendor
|
||||
:demand
|
||||
:hook (dired-mode . siren-dired-mode-setup)
|
||||
|
||||
:init
|
||||
(defun siren-dired-mode-setup ()
|
||||
(linum-mode t)
|
||||
(define-key dired-mode-map (kbd "c") 'dired-create-directory)
|
||||
(toggle-diredp-find-file-reuse-dir 1))
|
||||
|
||||
:config
|
||||
(unbind-key "M-i" dired-mode-map)
|
||||
(unbind-key "M-l" dired-mode-map))
|
||||
|
||||
(provide 'siren-dired)
|
||||
;;; siren-dired.el ends here
|
||||
20
modules/navigation/siren-direx.el
Normal file
20
modules/navigation/siren-direx.el
Normal file
@@ -0,0 +1,20 @@
|
||||
;;; siren-direx.el --- jimeh's Emacs Siren: direx configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for direx.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(use-package direx
|
||||
:bind ("C-x j" . direx-project:jump-to-project-root)
|
||||
:hook (direx-mode . siren-direx-mode-setup)
|
||||
|
||||
:config
|
||||
(setq direx:closed-icon " + "
|
||||
direx:open-icon " - "))
|
||||
|
||||
(defun siren-direx-mode-setup ())
|
||||
|
||||
(provide 'siren-direx)
|
||||
;;; siren-direx.el ends here
|
||||
@@ -8,6 +8,8 @@
|
||||
|
||||
(use-package dumb-jump
|
||||
:bind
|
||||
("C-c C-j" . dumb-jump-go)
|
||||
("C-c b" . dumb-jump-back)
|
||||
("M-g o" . dumb-jump-go-other-window)
|
||||
("M-g j" . dumb-jump-go)
|
||||
("M-g b" . dumb-jump-back)
|
||||
@@ -6,8 +6,9 @@
|
||||
|
||||
;;; Code:
|
||||
|
||||
;; Loads from vendor.
|
||||
(require 'hideshowvis)
|
||||
(use-package hideshowvis
|
||||
:ensure nil ;; loaded from vendor
|
||||
)
|
||||
|
||||
(defun siren-toggle-hiding (column)
|
||||
"Toggle hiding/showing blocks via hs-mode.
|
||||
43
modules/navigation/siren-full-ack.el
Normal file
43
modules/navigation/siren-full-ack.el
Normal file
@@ -0,0 +1,43 @@
|
||||
;;; siren-full-ack.el --- jimeh's Emacs Siren: full-ack configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for full-ack.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(use-package full-ack
|
||||
:bind
|
||||
("C-c C-a" . ack)
|
||||
|
||||
:config
|
||||
(setq ack-arguments '("--sort-files"
|
||||
"--ignore-dir=vendor/ruby"
|
||||
"--ignore-dir=vendor/bundle"
|
||||
"--ignore-dir=coverage"
|
||||
"--ignore-dir=savefile"
|
||||
"--ignore-dir=Godeps"
|
||||
"--ignore-dir=elpa"
|
||||
"--ignore-dir=docs"
|
||||
"--ignore-dir=doc"
|
||||
"--type-add=js=.js,.js.erb"
|
||||
"--type-add=ruby=.jbuilder,.rabl"
|
||||
"--type-add=html=.haml,.hamlc,.jade"
|
||||
"--type-add=css=.sass,.scss,.styl"
|
||||
"--type-set=coffee=.coffee"
|
||||
"--type-set=cucumber=.feature")
|
||||
ack-project-root-file-patterns '(".project\\'"
|
||||
".xcodeproj\\'"
|
||||
".sln\\'"
|
||||
"\\`Project.ede\\'"
|
||||
"\\`.git\\'"
|
||||
"\\`.bzr\\'"
|
||||
"\\`_darcs\\'"
|
||||
"\\`.hg\\'"
|
||||
"\\`Gemfile\\'"
|
||||
"\\`Rakefile\\'"
|
||||
"\\`Makefile\\'")
|
||||
ack-prompt-for-directory 'unless-guessed))
|
||||
|
||||
(provide 'siren-full-ack)
|
||||
;;; siren-full-ack.el ends here
|
||||
@@ -8,18 +8,13 @@
|
||||
|
||||
(use-package helm
|
||||
:defer t
|
||||
:config
|
||||
(setq helm-autoresize-mode t
|
||||
helm-autoresize-max-height 30
|
||||
helm-autoresize-min-height 30
|
||||
helm-buffer-max-length 64
|
||||
helm-case-fold-search 'smart
|
||||
helm-echo-input-in-header-line t
|
||||
helm-file-name-case-fold-search 'smart
|
||||
helm-split-window-default-side 'below)
|
||||
|
||||
(setq siren-helm--did-hide-neotree nil)
|
||||
:hook ((helm-minibuffer-set-up . siren-helm--hide-minibuffer-maybe)
|
||||
(helm-before-initialize . siren-helm--toggle-header-line)
|
||||
(helm-minibuffer-set-up . siren-helm--popwin-help-mode-off)
|
||||
(helm-cleanup . siren-helm--popwin-help-mode-on)
|
||||
(helm-cleanup . siren-helm--show-neotree-maybe))
|
||||
|
||||
:init
|
||||
;; From: https://www.reddit.com/r/emacs/comments/3asbyn/new_and_very_useful_helm_feature_enter_search/
|
||||
(defun siren-helm--hide-minibuffer-maybe ()
|
||||
(when (with-helm-buffer helm-echo-input-in-header-line)
|
||||
@@ -29,16 +24,12 @@
|
||||
`(:background ,bg-color :foreground ,bg-color)))
|
||||
(setq-local cursor-type nil))))
|
||||
|
||||
(add-hook 'helm-minibuffer-set-up-hook #'siren-helm--hide-minibuffer-maybe)
|
||||
|
||||
;; From: https://github.com/emacs-helm/helm/issues/918#issuecomment-81555133
|
||||
(defun siren-helm--toggle-header-line ()
|
||||
(if (= (length helm-sources) 1)
|
||||
(set-face-attribute 'helm-source-header nil :height 0.1)
|
||||
(set-face-attribute 'helm-source-header nil :height 1.0)))
|
||||
|
||||
(add-hook 'helm-before-initialize-hook #'siren-helm--toggle-header-line)
|
||||
|
||||
;; From: https://github.com/emacs-helm/helm/wiki/Popwin
|
||||
(defun siren-helm--popwin-help-mode-off ()
|
||||
"Turn `popwin-mode' off for *Help* buffers."
|
||||
@@ -46,8 +37,6 @@
|
||||
(customize-set-variable 'popwin:special-display-config
|
||||
(delq 'help-mode popwin:special-display-config))))
|
||||
|
||||
(add-hook 'helm-minibuffer-set-up-hook #'siren-helm--popwin-help-mode-off)
|
||||
|
||||
;; From: https://github.com/emacs-helm/helm/wiki/Popwin
|
||||
(defun siren-helm--popwin-help-mode-on ()
|
||||
"Turn `popwin-mode' on for *Help* buffers."
|
||||
@@ -55,8 +44,6 @@
|
||||
(customize-set-variable 'popwin:special-display-config
|
||||
(add-to-list 'popwin:special-display-config 'help-mode nil #'eq))))
|
||||
|
||||
(add-hook 'helm-cleanup-hook #'siren-helm--popwin-help-mode-on)
|
||||
|
||||
(defun siren-helm--hide-neotree (&rest plist)
|
||||
(when (and (fboundp 'neotree-hide)
|
||||
(fboundp 'neo-global--window-exists-p)
|
||||
@@ -64,15 +51,24 @@
|
||||
(setq siren-helm--did-hide-neotree t)
|
||||
(neotree-hide)))
|
||||
|
||||
(advice-add 'helm :before 'siren-helm--hide-neotree)
|
||||
|
||||
(defun siren-helm--show-neotree-maybe ()
|
||||
(when (and (fboundp 'neotree-show)
|
||||
siren-helm--did-hide-neotree)
|
||||
(setq siren-helm--did-hide-neotree nil)
|
||||
(run-with-timer 0.01 nil #'neotree-show)))
|
||||
|
||||
(add-hook 'helm-cleanup-hook #'siren-helm--show-neotree-maybe))
|
||||
:config
|
||||
(setq helm-autoresize-max-height 30
|
||||
helm-autoresize-min-height 30
|
||||
helm-autoresize-mode t
|
||||
helm-buffer-max-length 64
|
||||
helm-case-fold-search 'smart
|
||||
helm-echo-input-in-header-line t
|
||||
helm-file-name-case-fold-search 'smart
|
||||
helm-split-window-default-side 'below
|
||||
siren-helm--did-hide-neotree nil)
|
||||
|
||||
(advice-add 'helm :before 'siren-helm--hide-neotree))
|
||||
|
||||
(use-package helm-descbinds
|
||||
:defer t)
|
||||
@@ -7,9 +7,14 @@
|
||||
;;; Code:
|
||||
|
||||
(use-package highlight-symbol
|
||||
:diminish highlight-symbol-mode
|
||||
:bind
|
||||
(("C-c C-p" . highlight-symbol-prev)
|
||||
("C-c C-n" . highlight-symbol-next))
|
||||
("C-c C-p" . highlight-symbol-prev)
|
||||
("C-c C-n" . highlight-symbol-next)
|
||||
|
||||
:hook
|
||||
(prog-mode . highlight-symbol-mode)
|
||||
|
||||
:config
|
||||
(setq highlight-symbol-highlight-single-occurrence 'nil
|
||||
highlight-symbol-idle-delay 0.5))
|
||||
@@ -7,7 +7,7 @@
|
||||
;;; Code:
|
||||
|
||||
(defun siren-move-beginning-of-line (arg)
|
||||
"Move point back to indentation of beginning of line.
|
||||
"Move point back to indentation or beginning of line.
|
||||
|
||||
Move point to the first non-whitespace character on this line.
|
||||
If point is already there, move to the beginning of the line.
|
||||
@@ -7,8 +7,18 @@
|
||||
;;; Code:
|
||||
|
||||
(use-package treemacs
|
||||
:ensure t
|
||||
:defer t
|
||||
|
||||
:bind
|
||||
([f8] . treemacs-toggle)
|
||||
("M-0" . treemacs-select-window)
|
||||
("C-c 1" . treemacs-delete-other-windows)
|
||||
;; ("M-m ft" . treemacs-toggle)
|
||||
;; ("M-m fT" . treemacs)
|
||||
;; ("M-m fB" . treemacs-bookmark)
|
||||
;; ("M-m f C-t" . treemacs-find-file)
|
||||
;; ("M-m f M-t" . treemacs-find-tag)
|
||||
|
||||
:config
|
||||
(progn
|
||||
(use-package treemacs-evil
|
||||
@@ -28,28 +38,16 @@
|
||||
treemacs-goto-tag-strategy 'refetch-index)
|
||||
|
||||
(treemacs-follow-mode t)
|
||||
(treemacs-filewatch-mode t))
|
||||
:bind
|
||||
(:map global-map
|
||||
([f8] . treemacs-toggle)
|
||||
("M-0" . treemacs-select-window)
|
||||
("C-c 1" . treemacs-delete-other-windows)
|
||||
;; ("M-m ft" . treemacs-toggle)
|
||||
;; ("M-m fT" . treemacs)
|
||||
;; ("M-m fB" . treemacs-bookmark)
|
||||
;; ("M-m f C-t" . treemacs-find-file)
|
||||
;; ("M-m f M-t" . treemacs-find-tag)
|
||||
)
|
||||
)
|
||||
(treemacs-filewatch-mode t)))
|
||||
|
||||
(use-package treemacs-projectile
|
||||
:defer t
|
||||
:ensure t
|
||||
:bind
|
||||
("C-x C-p" . treemacs-projectile)
|
||||
("C-x C-p" . treemacs-projectile-toggle)
|
||||
|
||||
:config
|
||||
(setq treemacs-header-function #'treemacs-projectile-create-header)
|
||||
:bind (:map global-map
|
||||
("C-x C-p" . treemacs-projectile)
|
||||
("C-x C-p" . treemacs-projectile-toggle)))
|
||||
(setq treemacs-header-function #'treemacs-projectile-create-header))
|
||||
|
||||
(provide 'siren-treemacs)
|
||||
;;; siren-treemacs.el ends here
|
||||
@@ -1,24 +0,0 @@
|
||||
;;; siren-conf.el --- jimeh's Emacs Siren: conf-mode configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for conf-mode.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'siren-programming)
|
||||
|
||||
(use-package conf-mode
|
||||
:mode "Procfile\\'"
|
||||
:config
|
||||
(defun siren-conf-mode-defaults ()
|
||||
(siren-prog-mode-defaults)
|
||||
(setq tab-width 2)
|
||||
(highlight-indentation-set-offset 2)
|
||||
(highlight-indentation-current-column-mode))
|
||||
|
||||
(setq siren-conf-mode-hook 'siren-conf-mode-defaults)
|
||||
(add-hook 'conf-mode-hook (lambda () (run-hooks 'siren-conf-mode-hook))))
|
||||
|
||||
(provide 'siren-conf)
|
||||
;;; siren-conf.el ends here
|
||||
@@ -1,28 +0,0 @@
|
||||
;;; siren-css.el --- jimeh's Emacs Siren: css-mode configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for css-mode.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'siren-programming)
|
||||
(require 'siren-rainbow)
|
||||
|
||||
(use-package css-mode
|
||||
:mode "\\.css\\'"
|
||||
:config
|
||||
(setq css-indent-offset 2)
|
||||
|
||||
(defun siren-css-mode-defaults ()
|
||||
(siren-prog-mode-defaults)
|
||||
(rainbow-mode +1)
|
||||
(setq tab-width 2)
|
||||
(highlight-indentation-current-column-mode))
|
||||
|
||||
(setq siren-css-mode-hook 'siren-css-mode-defaults)
|
||||
(add-hook 'css-mode-hook (lambda ()
|
||||
(run-hooks 'siren-css-mode-hook))))
|
||||
|
||||
(provide 'siren-css)
|
||||
;;; siren-css.el ends here
|
||||
@@ -1,27 +0,0 @@
|
||||
;;; siren-cucumber.el --- jimeh's Emacs Siren: feature-mode configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for feature-mode.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'siren-programming)
|
||||
|
||||
(use-package feature-mode
|
||||
:mode "\\.feature\\'"
|
||||
:interpreter "cucumber"
|
||||
|
||||
:config
|
||||
(defun siren-feature-mode-defaults ()
|
||||
(siren-prog-mode-defaults)
|
||||
(setq tab-width 2)
|
||||
(highlight-indentation-set-offset 2)
|
||||
(highlight-indentation-current-column-mode))
|
||||
|
||||
(setq siren-feature-mode-hook 'siren-feature-mode-defaults)
|
||||
(add-hook 'feature-mode-hook (lambda ()
|
||||
(run-hooks 'siren-feature-mode-hook))))
|
||||
|
||||
(provide 'siren-cucumber)
|
||||
;;; siren-cucumber.el ends here
|
||||
@@ -1,21 +0,0 @@
|
||||
;;; siren-dired.el --- jimeh's Emacs Siren: dired configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for dired.
|
||||
|
||||
;;; Code:
|
||||
|
||||
;; Loads from vendor.
|
||||
(require 'dired+)
|
||||
|
||||
(defun siren-dired-mode-defaults ()
|
||||
(linum-mode t)
|
||||
(define-key dired-mode-map (kbd "c") 'dired-create-directory)
|
||||
(toggle-diredp-find-file-reuse-dir 1))
|
||||
|
||||
(setq siren-dired-mode-hook 'siren-dired-mode-defaults)
|
||||
(add-hook 'dired-mode-hook (lambda () (run-hooks 'siren-dired-mode-hook)))
|
||||
|
||||
(provide 'siren-dired)
|
||||
;;; siren-dired.el ends here
|
||||
@@ -1,23 +0,0 @@
|
||||
;;; siren-direx.el --- jimeh's Emacs Siren: direx configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for direx.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(use-package direx
|
||||
:bind
|
||||
("C-x j" . direx-project:jump-to-project-root)
|
||||
|
||||
:config
|
||||
(setq direx:closed-icon " + "
|
||||
direx:open-icon " - ")
|
||||
|
||||
(defun siren-direx-mode-defaults ())
|
||||
|
||||
(setq siren-direx-mode-hook 'siren-direx-mode-defaults)
|
||||
(add-hook 'direx-mode-hook (lambda () (run-hooks 'siren-direx-mode-hook))))
|
||||
|
||||
(provide 'siren-direx)
|
||||
;;; siren-direx.el ends here
|
||||
@@ -1,24 +0,0 @@
|
||||
;;; siren-dockerfile.el --- jimeh's Emacs Siren: dockerfile-mode configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for dockerfile-mode.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'siren-programming)
|
||||
|
||||
(use-package dockerfile-mode
|
||||
:mode "Dockerfile\\'"
|
||||
|
||||
:config
|
||||
(defun siren-dockerfile-mode-defaults ()
|
||||
(siren-prog-mode-defaults)
|
||||
(subword-mode +1))
|
||||
|
||||
(setq siren-dockerfile-mode-hook 'siren-dockerfile-mode-defaults)
|
||||
(add-hook 'dockerfile-mode-hook (lambda ()
|
||||
(run-hooks 'siren-dockerfile-mode-hook))))
|
||||
|
||||
(provide 'siren-dockerfile)
|
||||
;;; siren-dockerfile.el ends here
|
||||
@@ -1,69 +0,0 @@
|
||||
;;; siren-escreen.el --- jimeh's Emacs Siren: escreen configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for escreen.
|
||||
|
||||
;;; Code:
|
||||
|
||||
;; Loads from vendor.
|
||||
(require 'escreen)
|
||||
|
||||
;; Escreen Helper
|
||||
;; - from http://blog.nguyenvq.com/2011/03/07/escreen-instead-of-elscreen-for-screen-like-features-in-emacs/
|
||||
(defun escreen-get-active-screen-numbers-with-emphasis ()
|
||||
"what the name says"
|
||||
(interactive)
|
||||
(let ((escreens (escreen-get-active-screen-numbers))
|
||||
(emphased ""))
|
||||
(dolist (s escreens)
|
||||
(setq emphased
|
||||
(concat emphased (if (= escreen-current-screen-number s)
|
||||
(propertize (number-to-string s)
|
||||
;;'face 'custom-variable-tag) " ")
|
||||
;;'face 'info-title-3)
|
||||
'face 'font-lock-warning-face)
|
||||
;;'face 'secondary-selection)
|
||||
(number-to-string s))
|
||||
" ")))
|
||||
(message "escreen: active screens: %s" emphased)))
|
||||
|
||||
;; Initialize escreen
|
||||
(escreen-install)
|
||||
|
||||
;; Set prefix key to C-z.
|
||||
(setq escreen-prefix-char (kbd "C-z"))
|
||||
(global-set-key escreen-prefix-char 'escreen-prefix)
|
||||
(define-key escreen-map escreen-prefix-char 'escreen-goto-last-screen)
|
||||
|
||||
;; Toggle screens.
|
||||
(define-key escreen-map (kbd "l") 'escreen-goto-last-screen)
|
||||
(define-key escreen-map (kbd "C-l") 'escreen-goto-last-screen)
|
||||
|
||||
;; List screens.
|
||||
(define-key escreen-map (kbd "a")
|
||||
'escreen-get-active-screen-numbers-with-emphasis)
|
||||
(define-key escreen-map (kbd "C-a")
|
||||
'escreen-get-active-screen-numbers-with-emphasis)
|
||||
(define-key escreen-map (kbd ";")
|
||||
'escreen-get-active-screen-numbers-with-emphasis)
|
||||
(define-key escreen-map (kbd "C-;")
|
||||
'escreen-get-active-screen-numbers-with-emphasis)
|
||||
|
||||
;; Goto screens.
|
||||
(global-set-key (kbd "s-}") 'escreen-goto-next-screen)
|
||||
(global-set-key (kbd "s-{") 'escreen-goto-prev-screen)
|
||||
|
||||
;; Ctrl versions of default commands.
|
||||
(define-key escreen-map (kbd "C-c") 'escreen-create-screen)
|
||||
(define-key escreen-map (kbd "C-g") 'escreen-goto-screen)
|
||||
(define-key escreen-map (kbd "C-k") 'escreen-kill-screen)
|
||||
(define-key escreen-map (kbd "C-n") 'escreen-goto-next-screen)
|
||||
(define-key escreen-map (kbd "C-p") 'escreen-goto-prev-screen)
|
||||
|
||||
;; Show list of screens when you switch/create/kill.
|
||||
(add-hook 'escreen-goto-screen-hook
|
||||
'escreen-get-active-screen-numbers-with-emphasis)
|
||||
|
||||
(provide 'siren-escreen)
|
||||
;;; siren-escreen.el ends here
|
||||
@@ -1,28 +0,0 @@
|
||||
;;; siren-evil.el --- jimeh's Emacs Siren: evil configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for evil.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(use-package evil
|
||||
:config
|
||||
;; Various evil config options borrowed from:
|
||||
;; http://www.lukeswart.net/2015/04/lightning-intro-to-emacs-using-evil-mode-and-org-mode/
|
||||
|
||||
;; Treat wrapped line scrolling as single lines
|
||||
(define-key evil-normal-state-map (kbd "j") 'evil-next-visual-line)
|
||||
(define-key evil-normal-state-map (kbd "k") 'evil-previous-visual-line)
|
||||
|
||||
;; esc quits pretty much anything (like pending prompts in the minibuffer)
|
||||
(define-key evil-normal-state-map [escape] 'keyboard-quit)
|
||||
(define-key evil-visual-state-map [escape] 'keyboard-quit)
|
||||
(define-key minibuffer-local-map [escape] 'minibuffer-keyboard-quit)
|
||||
(define-key minibuffer-local-ns-map [escape] 'minibuffer-keyboard-quit)
|
||||
(define-key minibuffer-local-completion-map [escape] 'minibuffer-keyboard-quit)
|
||||
(define-key minibuffer-local-must-match-map [escape] 'minibuffer-keyboard-quit)
|
||||
(define-key minibuffer-local-isearch-map [escape] 'minibuffer-keyboard-quit))
|
||||
|
||||
(provide 'siren-evil)
|
||||
;;; siren-evil.el ends here
|
||||
@@ -1,17 +0,0 @@
|
||||
;;; siren-flyspell.el --- jimeh's Emacs Siren: flyspell configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for flyspell.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'flyspell)
|
||||
(diminish 'flyspell-mode)
|
||||
(setq ispell-program-name "aspell" ; use aspell instead of ispell
|
||||
ispell-extra-args '("--lang=en" "--sug-mode=ultra"))
|
||||
|
||||
(global-set-key (kbd "s-.") 'flyspell-correct-word-before-point)
|
||||
|
||||
(provide 'siren-flyspell)
|
||||
;;; siren-flyspell.el ends here
|
||||
@@ -1,45 +0,0 @@
|
||||
;;; siren-full-ack.el --- jimeh's Emacs Siren: full-ack configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for full-ack.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(use-package full-ack
|
||||
:bind
|
||||
("C-c C-a" . ack)
|
||||
|
||||
:config
|
||||
(setq ack-arguments
|
||||
'("--sort-files"
|
||||
"--ignore-dir=vendor/ruby"
|
||||
"--ignore-dir=vendor/bundle"
|
||||
"--ignore-dir=coverage"
|
||||
"--ignore-dir=savefile"
|
||||
"--ignore-dir=Godeps"
|
||||
"--ignore-dir=elpa"
|
||||
"--ignore-dir=docs"
|
||||
"--ignore-dir=doc"
|
||||
"--type-add=js=.js,.js.erb"
|
||||
"--type-add=ruby=.jbuilder,.rabl"
|
||||
"--type-add=html=.haml,.hamlc,.jade"
|
||||
"--type-add=css=.sass,.scss,.styl"
|
||||
"--type-set=coffee=.coffee"
|
||||
"--type-set=cucumber=.feature"))
|
||||
(setq ack-project-root-file-patterns
|
||||
'(".project\\'"
|
||||
".xcodeproj\\'"
|
||||
".sln\\'"
|
||||
"\\`Project.ede\\'"
|
||||
"\\`.git\\'"
|
||||
"\\`.bzr\\'"
|
||||
"\\`_darcs\\'"
|
||||
"\\`.hg\\'"
|
||||
"\\`Gemfile\\'"
|
||||
"\\`Rakefile\\'"
|
||||
"\\`Makefile\\'"))
|
||||
(setq ack-prompt-for-directory 'unless-guessed))
|
||||
|
||||
(provide 'siren-full-ack)
|
||||
;;; siren-full-ack.el ends here
|
||||
@@ -1,26 +0,0 @@
|
||||
;;; siren-gitconfig.el --- jimeh's Emacs Siren: gitconfig-mode configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for gitconfig-mode.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'siren-programming)
|
||||
|
||||
(use-package gitconfig-mode
|
||||
:mode "\\.gitconfig" "gitconfig\\'" "\\.git\\\/config"
|
||||
|
||||
:config
|
||||
(defun siren-gitconfig-mode-defaults ()
|
||||
(siren-prog-mode-defaults)
|
||||
(setq tab-width 2)
|
||||
(highlight-indentation-current-column-mode)
|
||||
(run-hooks 'siren-prog-mode-hook))
|
||||
|
||||
(setq siren-gitconfig-mode-hook 'siren-gitconfig-mode-defaults)
|
||||
(add-hook 'gitconfig-mode-hook (lambda ()
|
||||
(run-hooks 'siren-gitconfig-mode-hook))))
|
||||
|
||||
(provide 'siren-gitconfig)
|
||||
;;; siren-gitconfig.el ends here
|
||||
@@ -1,26 +0,0 @@
|
||||
;;; siren-gitignore.el --- jimeh's Emacs Siren: gitignore-mode configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for gitignore-mode.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'siren-programming)
|
||||
|
||||
(use-package gitignore-mode
|
||||
:mode "\\.gitignore" "gitignore\\'"
|
||||
|
||||
:config
|
||||
(defun siren-gitignore-mode-defaults ()
|
||||
(siren-prog-mode-defaults)
|
||||
(setq tab-width 2)
|
||||
(highlight-indentation-current-column-mode)
|
||||
(run-hooks 'siren-prog-mode-hook))
|
||||
|
||||
(setq siren-gitignore-mode-hook 'siren-gitignore-mode-defaults)
|
||||
(add-hook 'gitignore-mode-hook (lambda ()
|
||||
(run-hooks 'siren-gitignore-mode-hook))))
|
||||
|
||||
(provide 'siren-gitignore)
|
||||
;;; siren-gitignore.el ends here
|
||||
@@ -1,99 +0,0 @@
|
||||
;;; siren-go.el --- jimeh's Emacs Siren: go-mode configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for go-mode.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'siren-programming)
|
||||
|
||||
(use-package go-mode
|
||||
:mode "\\.go\\'"
|
||||
:interpreter "go"
|
||||
:commands go-mode
|
||||
:bind (:map go-mode-map
|
||||
("RET" . newline-and-indent)
|
||||
("C-c a" . go-test-current-project)
|
||||
("C-c m" . go-test-current-file)
|
||||
("C-c ." . go-test-current-test)
|
||||
("C-c b" . go-run)
|
||||
("C-c d" . godef-jump)
|
||||
("C-c C-j" . avy-goto-word-or-subword-1)
|
||||
("C-h f" . godoc-at-point))
|
||||
|
||||
:config
|
||||
(message "loading go-mode")
|
||||
|
||||
(when (memq window-system '(mac ns))
|
||||
(exec-path-from-shell-copy-env "GOPATH"))
|
||||
|
||||
;; Ignore go test -c output files
|
||||
(add-to-list 'completion-ignored-extensions ".test")
|
||||
|
||||
(define-key 'help-command (kbd "G") 'godoc)
|
||||
|
||||
(defun siren-go-mode-defaults ()
|
||||
(siren-prog-mode-defaults)
|
||||
|
||||
;; Prefer goimports to gofmt if installed
|
||||
(let ((goimports (executable-find "goimports")))
|
||||
(when goimports
|
||||
(setq gofmt-command goimports)))
|
||||
|
||||
;; gofmt on save
|
||||
(add-hook 'before-save-hook 'gofmt-before-save nil t)
|
||||
|
||||
;; prevent go-projectile from screwing up GOPATH
|
||||
(setq go-projectile-switch-gopath 'never)
|
||||
|
||||
;; enable company-mode
|
||||
(set (make-local-variable 'company-backends) '(company-go))
|
||||
(company-mode +1)
|
||||
|
||||
;; enable hide/show
|
||||
(hs-minor-mode 1)
|
||||
|
||||
;; go-guru
|
||||
(go-guru-hl-identifier-mode 1)
|
||||
(setq go-guru-hl-identifier-idle-time 0.1)
|
||||
|
||||
;; stop whitespace being highlighted
|
||||
(whitespace-toggle-options '(tabs))
|
||||
|
||||
;; make tabs 4 spaces wide
|
||||
(setq tab-width 4)
|
||||
|
||||
;; El-doc for Go
|
||||
;; (go-eldoc-setup)
|
||||
|
||||
;; CamelCase aware editing operations
|
||||
(subword-mode +1))
|
||||
|
||||
(setq siren-go-mode-hook 'siren-go-mode-defaults)
|
||||
(add-hook 'go-mode-hook (lambda ()
|
||||
(run-hooks 'siren-go-mode-hook))))
|
||||
|
||||
(use-package company-go :defer t)
|
||||
(use-package go-eldoc :defer t)
|
||||
(use-package go-guru :defer t)
|
||||
(use-package go-rename :defer t)
|
||||
(use-package gotest :defer t)
|
||||
|
||||
(use-package go-projectile
|
||||
:defer t
|
||||
:init
|
||||
;; prevent go-projectile from screwing up GOPATH
|
||||
(setq go-projectile-switch-gopath 'never))
|
||||
|
||||
(use-package flycheck-gometalinter
|
||||
:init
|
||||
(setq flycheck-gometalinter-fast t
|
||||
flycheck-gometalinter-tests t
|
||||
flycheck-gometalinter-vendor t)
|
||||
:config
|
||||
(eval-after-load 'flycheck
|
||||
'(add-hook 'flycheck-mode-hook #'flycheck-gometalinter-setup)))
|
||||
|
||||
(provide 'siren-go)
|
||||
;;; siren-go.el ends here
|
||||
@@ -1,21 +0,0 @@
|
||||
;;; siren-goto-chg.el --- jimeh's Emacs Siren: goto-chg configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for goto-chg.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(use-package goto-chg
|
||||
:config
|
||||
(global-set-key (kbd "C-.") 'goto-last-change)
|
||||
(global-set-key (kbd "C-,") 'goto-last-change-reverse)
|
||||
|
||||
;; Flyspell uses C-. and C-, itself in a such a way that this is the only way
|
||||
;; to make goto-chg bind to those keys while flyspell-mode is enabled.
|
||||
(let ((map flyspell-mode-map))
|
||||
(define-key map (kbd "C-.") 'goto-last-change)
|
||||
(define-key map (kbd "C-,") 'goto-last-change-reverse)))
|
||||
|
||||
(provide 'siren-goto-chg)
|
||||
;;; siren-goto-chg.el ends here
|
||||
@@ -1,46 +0,0 @@
|
||||
;;; siren-js.el --- jimeh's Emacs Siren: js-mode configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for js-mode.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(use-package eslintd-fix
|
||||
:defer t)
|
||||
|
||||
(require 'siren-programming)
|
||||
|
||||
(add-to-list 'auto-mode-alist '("\\.js\\'" . js-mode))
|
||||
(add-to-list 'auto-mode-alist '("\\.pac\\'" . js-mode))
|
||||
(add-to-list 'interpreter-mode-alist '("node" . js-mode))
|
||||
|
||||
(defun siren-js-mode-defaults ()
|
||||
"Default tweaks for `js-mode'."
|
||||
(let ((width 2))
|
||||
(setq js-indent-level width
|
||||
indent-level width
|
||||
tab-width width))
|
||||
|
||||
(setq flycheck-checker 'javascript-eslint
|
||||
flycheck-javascript-eslint-executable "eslint_d")
|
||||
|
||||
(siren-prog-mode-defaults)
|
||||
(eslintd-fix-mode)
|
||||
(company-mode +1)
|
||||
(subword-mode +1)
|
||||
(hs-minor-mode 1)
|
||||
(highlight-indentation-current-column-mode)
|
||||
(hideshowvis-enable)
|
||||
|
||||
(let ((map js-mode-map))
|
||||
(define-key map (kbd "C-j") 'newline-and-indent)
|
||||
(define-key map (kbd "C-c C-h") 'siren-toggle-hiding)))
|
||||
|
||||
(setq siren-js-mode-hook 'siren-js-mode-defaults)
|
||||
|
||||
(add-hook 'js-mode-hook (lambda ()
|
||||
(run-hooks 'siren-js-mode-hook)))
|
||||
|
||||
(provide 'siren-js)
|
||||
;;; siren-js.el ends here
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user