diff --git a/init.el b/init.el index 5fa0d270b..bc8641e71 100644 --- a/init.el +++ b/init.el @@ -53,7 +53,6 @@ ;; init-auto-complete init-auto-insert ; for the lazy typis init-company ; see above - init-dev ; general dev tools/settings init-fly ; fly(check|spell) init-git ; git-gutter + modes init-ido ; a search engine for your car keys @@ -64,7 +63,6 @@ ;; init-d ; D - It's C, but better! ;; init-cscope init-csharp - init-lisp ; all things lisp; elisp, clojure ;; init-erlang ;; init-eshell init-go diff --git a/init/init-dev.el b/init/init-dev.el deleted file mode 100644 index f0fea9256..000000000 --- a/init/init-dev.el +++ /dev/null @@ -1,87 +0,0 @@ -(use-package hl-todo - :defer t - :init (add-hook 'after-change-major-mode-hook 'hl-todo-mode)) - -(use-package dash-at-point - :if is-mac - :commands (dash-at-point dash-at-point-with-docset)) - -(use-package rainbow-delimiters - :commands rainbow-delimiters-mode - :config - (progn - (setq rainbow-delimiters-outermost-only-face-count 1) - (set-face-attribute 'rainbow-delimiters-depth-1-face nil - :foreground 'unspecified - :inherit 'my-outermost-paren-face)) - :init - (progn - (add-hook 'emacs-lisp-mode-hook 'rainbow-delimiters-mode) - (add-hook 'js2-mode-hook 'rainbow-delimiters-mode) - (add-hook 'scss-mode-hook 'rainbow-delimiters-mode))) - -;;; Config modes -(use-package yaml-mode - :defer t - :config (add-hook 'yaml-mode-hook 'enable-tab-width-2)) - -(use-package emr - :commands (emr-initialize emr-show-refactor-menu) - :init (add-hook 'prog-mode-hook 'emr-initialize) - :config (bind popup-menu-keymap [escape] 'keyboard-quit)) - - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Code building -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(defvar my-build-command '("make %s" . "Makefile")) -(make-variable-buffer-local 'my-build-command) - -(defun set-build-command (command &optional file) - (when (or (null file) - (project-has-files file)) - (setq my-build-command `(,command . ,file)))) - -(evil-define-command my:build (arg) - "Call a build command in the current directory. -If ARG is nil this function calls `recompile', otherwise it calls -`compile' passing ARG as build command." - (interactive "") - (when (null my-build-command) - (user-error "No build command was set")) - (let ((build-file (cdr my-build-command)) - (build-cmd (car my-build-command))) - (if (project-has-files build-file) - (compile (format "cd '%s' && %s" build-file (format build-cmd (or arg "")))) - (error "Could not find Makefile")))) - - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Code running -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(evil-define-operator my:eval-region (beg end) - :move-point nil - (interactive "") - (cond ((eq major-mode 'emacs-lisp-mode) - (eval-region beg end)) - (t - (let ((interp (my--get-interpreter)) - (max-mini-window-height 1)) - (when interp (shell-command-on-region beg end interp)))))) - -(evil-define-command my:eval-buffer () - (interactive) - (cond ((eq major-mode 'emacs-lisp-mode) - (eval-buffer)) - (t - (let ((interp (my--get-interpreter)) - (max-mini-window-height 1)) - (when interp (shell-command-on-region (point-min) (point-max) interp)))))) - -(defun my--get-interpreter () - (car (--first (eq (cdr it) major-mode) interpreter-mode-alist))) - -(provide 'init-dev) -;;; init-dev.el ends here diff --git a/init/init-floobits.el b/init/init-floobits.el deleted file mode 100644 index 70f31b003..000000000 --- a/init/init-floobits.el +++ /dev/null @@ -1,12 +0,0 @@ -(use-package floobits - :commands (floobits-join-workspace - floobits-share-dir-public - floobits-share-dir-private - floobits-leave-workspace - floobits-summon - floobits-follow-mode-toggle - floobits-clear-highlights)) - - -(provide 'init-floobits) -;;; init-floobits.el ends here diff --git a/init/init-lisp.el b/init/init-lisp.el deleted file mode 100644 index f7763eeb2..000000000 --- a/init/init-lisp.el +++ /dev/null @@ -1,19 +0,0 @@ -;; Elisp ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(add-hook 'emacs-lisp-mode-hook 'turn-on-eldoc-mode) - -;; Real go-to-definition for elisp -(bind 'motion emacs-lisp-mode-map "gd" - (λ (let ((func (function-called-at-point))) - (if func (find-function func))))) - -;; Go-to-definition in other buffer -(bind 'motion emacs-lisp-mode-map "gD" - (λ (let ((func (function-called-at-point))) - (if func (find-function-other-window func))))) - -;; TODO Add clojure support -;; TODO Add scheme support - - -(provide 'init-lisp) -;;; init-elisp.el ends here