Majorly re-organize modules

- Split large modules into smaller parts (e.g. siren-text-manipulation)
- Organize modules into high level groups:
  - completion
  - core
  - editor
  - languages
  - linting
  - misc
  - navigation
  - projects
  - spelling
  - text-editing
  - version-control
  - windows
  - workspaces
This commit is contained in:
2018-05-20 17:31:11 +01:00
parent 3b07c4cfbf
commit 87a86191db
118 changed files with 592 additions and 463 deletions

View File

@@ -0,0 +1,12 @@
;;; siren-all-the-icons.el --- jimeh's Emacs Siren: all-the-icons configuration.
;;; Commentary:
;; Basic configuration for all-the-icons.
;;; Code:
(use-package all-the-icons)
(provide 'siren-all-the-icons)
;;; siren-all-the-icons.el ends here

View File

@@ -0,0 +1,46 @@
;;; siren-ecb.el --- jimeh's Emacs Siren: ECB configuration.
;;; Commentary:
;; Basic configuration for ECB.
;;; Code:
(use-package ecb
:config
(setq ecb-layout-name "left13"
ecb-primary-secondary-mouse-buttons 'mouse-1--mouse-2
ecb-tree-make-parent-node-sticky nil
ecb-prescan-directories-for-emptyness nil
ecb-tip-of-the-day nil
ecb-tree-indent 3
ecb-windows-width 0.24
ecb-source-path '(("~/Projects" "Projects")
("/media/projects" "devbox/projects")
("~/.emacs.d" ".emacs.d")
("~/.dotfiles" ".dotfiles")
("~/Notes" "Notes")
("~/Projects/which" "which")
("~/Projects/fitzdares" "fitzdares")
("~/Projects/Go" "Go")
("~/src" "src")
("~/Sites" "Sites")
("~" "~")
("/" "/"))
;; Add "^Icon$" as a exclude to the default sources. Dropbox uses "Icon"
;; files with some weird unprintable character at the end of the
;; filename to customize the folder icon. ECB however errors out when
;; trying to render this file, hence we're no longer displaying it at
;; all.
ecb-source-file-regexps
(quote
((".*"
("\\(^\\(#\\)\\|\\(~$\\|\\.\\(elc\\|obj\\|o\\|class\\|lib\\|dll\\|a\\|so\\|cache\\)$\\)\\)" "^Icon$")
("^\\.\\(emacs\\|gnus\\)$")))))
(if window-system (ecb-activate))
(global-set-key (kbd "C-x C-p") 'ecb-toggle-ecb-windows))
(provide 'siren-ecb)
;;; siren-ecb.el ends here

View File

@@ -0,0 +1,14 @@
;;; siren-editorconfig.el --- jimeh's Emacs Siren: editorconfig configuration.
;;; Commentary:
;; Basic configuration for editorconfig.
;;; Code:
(use-package editorconfig
:config
(editorconfig-mode 1))
(provide 'siren-editorconfig)
;;; siren-editorconfig.el ends here

View File

@@ -0,0 +1,25 @@
;;; siren-helm-projectile.el --- jimeh's Emacs Siren: helm-projectile configuration.
;;; Commentary:
;; Basic configuration for helm-projectile.
;;; Code:
(require 'siren-helm)
(use-package helm-projectile
:bind
("C-x ;" . helm-projectile)
("C-x C-;" . helm-projectile-find-file)
("C-c ;" . helm-projectile-switch-project)
("C-c C-;" . helm-projectile-switch-project)
:config
;; Don't bother with using files in open Dired buffer as initial source for
;; helm-projectile-find-file, just use the list of files.
(setq helm-source-projectile-files-and-dired-list
'(helm-source-projectile-files-list)))
(provide 'siren-helm-projectile)
;;; siren-helm-projectile.el ends here

View File

@@ -0,0 +1,54 @@
;;; siren-neotree.el --- jimeh's Emacs Siren: neotree configuration.
;;; Commentary:
;; Basic configuration for neotree.
;;; Code:
(require 'siren-all-the-icons)
(require 'siren-projectile)
(use-package neotree
:bind
("C-x C-p" . neotree-toggle)
("C-x p" . neotree-project-dir)
:init
(defun neotree-project-dir ()
"Open NeoTree using the project root, using find-file-in-project,
or the current buffer directory."
(interactive)
(let ((project-dir (ignore-errors (projectile-project-root)))
(file-name (buffer-file-name))
(neo-smart-open nil))
(neotree-show)
(if project-dir (neotree-dir project-dir))
(if file-name (neotree-find file-name))))
(defun neotree-project-dir-toggle ()
"Toggle opening NeoTree using the project root, using find-file-in-project,
or the current buffer directory."
(interactive)
(if (and (fboundp 'neo-global--window-exists-p)
(neo-global--window-exists-p))
(neotree-hide)
(neotree-project-dir)))
:config
(if window-system
(setq neo-theme 'icons)
(setq neo-theme 'ascii))
(setq neo-autorefresh t
neo-force-change-root t
neo-mode-line-type 'default
neo-show-hidden-files t
neo-show-updir-line nil
neo-smart-open nil
neo-toggle-window-keep-p t
;; neo-vc-integration '(face char)
neo-window-width 54))
(provide 'siren-neotree)
;;; siren-neotree.el ends here

View File

@@ -0,0 +1,35 @@
;;; siren-project-explorer.el --- jimeh's Emacs Siren: project-explorer configuration.
;;; Commentary:
;; Basic configuration for project-explorer.
;;; Code:
(use-package project-explorer
:bind
("C-x C-p" . project-explorer-toggle)
:init
(setq pe/follow-current t
pe/width 54
pe/cache-directory (expand-file-name
"project-explorer-cache" siren-savefile-dir))
:config
;; Make Project Explorer open selected file in last used buffer
(setq pe/display-content-buffer-function
(lambda (buffer)
(let* (( last-buffer
(car (cl-remove 'project-explorer-mode
(buffer-list)
:key (apply-partially 'buffer-local-value
'major-mode))))
( window (get-buffer-window last-buffer)))
(if window
(set-window-buffer window buffer)
(pe/show-buffer buffer)))
)))
(provide 'siren-project-explorer)
;;; siren-project-explorer.el ends here

View File

@@ -0,0 +1,55 @@
;;; siren-projectile.el --- jimeh's Emacs Siren: projectile configuration.
;;; Commentary:
;; Basic configuration for projectile.
;;; Code:
(use-package projectile
:bind
("C-c p p" . projectile-switch-project)
("C-c C-b" . projectile-ibuffer)
("C-c C-k" . projectile-kill-buffers)
("C-x C-t" . projectile-find-file)
("C-x t" . projectile-find-test-file)
("C-x C-v" . projectile-switch-to-buffer)
:init
(setq projectile-cache-file (expand-file-name
"projectile.cache" siren-savefile-dir))
(setq projectile-completion-system 'ido
projectile-enable-caching nil
projectile-globally-ignored-directories '(".idea"
".eunit"
".git"
".hg"
".fslckout"
".bzr"
".svn"
"_darcs"
"vendor/bundle"
"vendor/ruby"
"coverage"
"docs"
"doc"
"log"
"logs"
"tmp"
"Godeps"
"elpa"
"savefile")
projectile-globally-ignored-files '("TAGS" "*.log")
projectile-sort-order 'recently-active
projectile-mode-line (quote ""))
:config
;; Treat separate directories with Gemfiles within a single git repo as separate
;; projects.
(push "Gemfile" projectile-project-root-files-bottom-up)
(projectile-global-mode t))
(provide 'siren-projectile)
;;; siren-projectile.el ends here

View File

@@ -0,0 +1,53 @@
;;; siren-treemacs.el --- jimeh's Emacs Siren: treemacs configuration.
;;; Commentary:
;; Basic configuration for treemacs.
;;; Code:
(use-package treemacs
: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
:ensure t
:demand t)
(setq treemacs-follow-after-init t
treemacs-width 35
treemacs-indentation 2
treemacs-git-integration t
treemacs-collapse-dirs 3
treemacs-silent-refresh nil
treemacs-change-root-without-asking t
treemacs-sorting 'alphabetic-desc
treemacs-show-hidden-files t
treemacs-never-persist nil
treemacs-is-never-other-window nil
treemacs-goto-tag-strategy 'refetch-index)
(treemacs-follow-mode t)
(treemacs-filewatch-mode t)))
(use-package treemacs-projectile
:defer t
:bind
("C-x C-p" . treemacs-projectile)
("C-x C-p" . treemacs-projectile-toggle)
:config
(setq treemacs-header-function #'treemacs-projectile-create-header))
(provide 'siren-treemacs)
;;; siren-treemacs.el ends here