diff options
Diffstat (limited to 'local-lib')
| -rw-r--r-- | local-lib/autocompletion-conf.el | 30 | ||||
| -rw-r--r-- | local-lib/persp-conf.el | 38 | ||||
| -rw-r--r-- | local-lib/powerline-conf.el | 96 | ||||
| -rw-r--r-- | local-lib/projectile-conf.el | 16 | ||||
| -rw-r--r-- | local-lib/python-conf.el | 16 | ||||
| -rw-r--r-- | local-lib/rust-conf.el | 32 | ||||
| -rw-r--r-- | local-lib/version-control-conf.el | 16 |
7 files changed, 0 insertions, 244 deletions
diff --git a/local-lib/autocompletion-conf.el b/local-lib/autocompletion-conf.el deleted file mode 100644 index 0b5d200..0000000 --- a/local-lib/autocompletion-conf.el +++ /dev/null | |||
| @@ -1,30 +0,0 @@ | |||
| 1 | ;;; autocompletion-conf.el --- configuration for language auto-complete | ||
| 2 | ;; Author: jason <jason@zzq.org> | ||
| 3 | ;; Created: 16 Jun 2017 | ||
| 4 | ;;; Commentary: | ||
| 5 | ;; | ||
| 6 | ;; Configures the auto-completion framework (company-mode) | ||
| 7 | ;; | ||
| 8 | ;;; Code: | ||
| 9 | (use-package company | ||
| 10 | :ensure t | ||
| 11 | :init | ||
| 12 | (setq | ||
| 13 | ;; Display the suggestion popup quickly | ||
| 14 | company-idle-delay 0.4 | ||
| 15 | ;; Display the suggestion popup after 1 character | ||
| 16 | company-minimum-prefix-length 1) | ||
| 17 | :config | ||
| 18 | (add-hook 'company-mode-hook '(lambda () | ||
| 19 | (progn | ||
| 20 | ;; I prefer to use TAB instead of RETURN to finish completion | ||
| 21 | (define-key company-active-map [return] nil) | ||
| 22 | (define-key company-active-map [tab] 'company-complete-selection))))) | ||
| 23 | ;; Display documentation in a popup | ||
| 24 | (use-package company-quickhelp | ||
| 25 | :ensure t | ||
| 26 | :config | ||
| 27 | (add-hook 'company-mode-hook '(lambda () | ||
| 28 | (progn | ||
| 29 | (company-quickhelp-mode))))) | ||
| 30 | (provide 'autocompletion-conf) | ||
diff --git a/local-lib/persp-conf.el b/local-lib/persp-conf.el deleted file mode 100644 index f875440..0000000 --- a/local-lib/persp-conf.el +++ /dev/null | |||
| @@ -1,38 +0,0 @@ | |||
| 1 | ;;; persp-conf.el --- configuration for persp-mode | ||
| 2 | ;; Author: jason <jason@zzq.org> | ||
| 3 | ;; Created: 16 Jun 2017 | ||
| 4 | ;; X-URL: https://github.com/Bad-ptr/persp-mode.el | ||
| 5 | ;;; Commentary: | ||
| 6 | ;; | ||
| 7 | ;; Enables different "workspaces" within Emacs. Similar to how a window manager | ||
| 8 | ;; might have several desktops | ||
| 9 | ;; | ||
| 10 | ;; Bindings: | ||
| 11 | ;; * <f8> - Switch between perspectives | ||
| 12 | ;; * <f9>, p - Manage perspectives | ||
| 13 | ;; | ||
| 14 | ;;; Code: | ||
| 15 | (use-package persp-mode | ||
| 16 | :ensure t | ||
| 17 | :bind (([f8] . persp-switch)) | ||
| 18 | :init | ||
| 19 | (setq persp-nil-name "Home" | ||
| 20 | persp-auto-resume-time 0) | ||
| 21 | ;; Adding this so that capturing process is not interrupted with annoying | ||
| 22 | ;; prompts "Kill and Close" etc. | ||
| 23 | (setq persp-kill-foreign-buffer-action nil | ||
| 24 | ;; increase the default name length | ||
| 25 | persp-lighter '(:eval (format (propertize " #%.10s" | ||
| 26 | 'face (let ((persp (get-current-persp))) | ||
| 27 | (if persp | ||
| 28 | (if (persp-contain-buffer-p (current-buffer) persp) | ||
| 29 | 'persp-face-lighter-default | ||
| 30 | 'persp-face-lighter-buffer-not-in-persp) | ||
| 31 | 'persp-face-lighter-nil-persp))) | ||
| 32 | (safe-persp-name (get-current-persp))))) | ||
| 33 | :config | ||
| 34 | ;; Set the persp-mode keymap prefix to <F9>, p | ||
| 35 | (persp-set-keymap-prefix (kbd "<f9> p")) | ||
| 36 | (persp-mode 1)) | ||
| 37 | |||
| 38 | (provide 'persp-conf) | ||
diff --git a/local-lib/powerline-conf.el b/local-lib/powerline-conf.el deleted file mode 100644 index 710be77..0000000 --- a/local-lib/powerline-conf.el +++ /dev/null | |||
| @@ -1,96 +0,0 @@ | |||
| 1 | ;;; powerline-conf.el --- configuration for powerline | ||
| 2 | ;; Author: jason <jason@zzq.org> | ||
| 3 | ;; Created: 16 Jun 2017 | ||
| 4 | ;; X-URL: https://github.com/milkypostman/powerline | ||
| 5 | ;;; Commentary: | ||
| 6 | ;; | ||
| 7 | ;; Styles the Emacs mode line | ||
| 8 | ;; | ||
| 9 | ;;; Code: | ||
| 10 | (defface my/modeline-narrow-face | ||
| 11 | '((t (:foreground "black" :background "yellow3"))) | ||
| 12 | "todo/fixme highlighting." | ||
| 13 | :group 'faces) | ||
| 14 | |||
| 15 | (defface my/modeline-read-only-face | ||
| 16 | '((t (:foreground "black" :background "orange4"))) | ||
| 17 | "Read-only buffer highlighting." | ||
| 18 | :group 'faces) | ||
| 19 | |||
| 20 | (defface my/modeline-modified-face | ||
| 21 | '((t (:foreground "gray80" :background "red4"))) | ||
| 22 | "Modified buffer highlighting." | ||
| 23 | :group 'faces) | ||
| 24 | |||
| 25 | (defun powerline-my-theme () | ||
| 26 | "Setup the default mode-line." | ||
| 27 | (interactive) | ||
| 28 | (setq-default mode-line-format | ||
| 29 | '("%e" | ||
| 30 | (:eval | ||
| 31 | (let* ((active (powerline-selected-window-active)) | ||
| 32 | (mode-line (if active 'mode-line 'mode-line-inactive)) | ||
| 33 | (face1 (if active 'powerline-active1 'powerline-inactive1)) | ||
| 34 | (face2 (if active 'powerline-active2 'powerline-inactive2)) | ||
| 35 | (separator-left (intern (format "powerline-%s-%s" | ||
| 36 | (powerline-current-separator) | ||
| 37 | (car powerline-default-separator-dir)))) | ||
| 38 | (separator-right (intern (format "powerline-%s-%s" | ||
| 39 | (powerline-current-separator) | ||
| 40 | (cdr powerline-default-separator-dir)))) | ||
| 41 | (lhs (append (list (powerline-raw " ")) | ||
| 42 | (let ((buffer-modified-str (if buffer-read-only | ||
| 43 | (if (buffer-modified-p) "%%*" "%%%%") | ||
| 44 | (if (buffer-modified-p) "**" "--")))) | ||
| 45 | (if buffer-read-only | ||
| 46 | (list (powerline-raw buffer-modified-str 'my/modeline-read-only-face)) | ||
| 47 | (if (buffer-modified-p) | ||
| 48 | (list (powerline-raw buffer-modified-str 'my/modeline-modified-face)) | ||
| 49 | (list (powerline-raw buffer-modified-str nil)))) | ||
| 50 | ) | ||
| 51 | (list | ||
| 52 | (when powerline-display-buffer-size | ||
| 53 | (powerline-buffer-size nil 'l)) | ||
| 54 | (when powerline-display-mule-info | ||
| 55 | (powerline-raw mode-line-mule-info nil 'l)) | ||
| 56 | (powerline-buffer-id nil 'l) | ||
| 57 | (when (and (boundp 'which-func-mode) which-func-mode) | ||
| 58 | (powerline-raw which-func-format nil 'l)) | ||
| 59 | (powerline-raw " ") | ||
| 60 | (funcall separator-left mode-line face1) | ||
| 61 | (when (and (boundp 'erc-track-minor-mode) erc-track-minor-mode) | ||
| 62 | (powerline-raw erc-modified-channels-object face1 'l)) | ||
| 63 | (powerline-major-mode face1 'l) | ||
| 64 | (powerline-process face1) | ||
| 65 | (powerline-minor-modes face1 'l) | ||
| 66 | (powerline-narrow face1 'l) | ||
| 67 | (powerline-raw " " face1) | ||
| 68 | (funcall separator-left face1 face2) | ||
| 69 | (powerline-vc face2 'r) | ||
| 70 | (when (bound-and-true-p nyan-mode) | ||
| 71 | (powerline-raw (list (nyan-create)) face2 'l))))) | ||
| 72 | (rhs (list (powerline-raw global-mode-string face2 'r) | ||
| 73 | ;; (funcall separator-right face2 face1) | ||
| 74 | ;; (unless window-system | ||
| 75 | ;; (powerline-raw (char-to-string #xe0a1) face1 'l)) | ||
| 76 | (powerline-raw "%4l" face1 'l) | ||
| 77 | (powerline-raw ":" face1 'l) | ||
| 78 | (powerline-raw "%3c" face1 'r) | ||
| 79 | (funcall separator-right face1 mode-line) | ||
| 80 | (powerline-raw " ") | ||
| 81 | (powerline-raw "%6p" nil 'r) | ||
| 82 | (when powerline-display-hud | ||
| 83 | (powerline-hud face2 face1))))) | ||
| 84 | (concat (powerline-render lhs) | ||
| 85 | (powerline-fill face2 (powerline-width rhs)) | ||
| 86 | (powerline-render rhs))))))) | ||
| 87 | |||
| 88 | (use-package powerline | ||
| 89 | :ensure t | ||
| 90 | :config | ||
| 91 | (setq powerline-default-separator 'wave | ||
| 92 | powerline-display-mule-info nil) | ||
| 93 | |||
| 94 | (powerline-my-theme)) | ||
| 95 | |||
| 96 | (provide 'powerline-conf) | ||
diff --git a/local-lib/projectile-conf.el b/local-lib/projectile-conf.el deleted file mode 100644 index 0472af8..0000000 --- a/local-lib/projectile-conf.el +++ /dev/null | |||
| @@ -1,16 +0,0 @@ | |||
| 1 | ;;; projectile-conf.el --- configuration for projectile-mode | ||
| 2 | ;; Author: jason <jason@zzq.org> | ||
| 3 | ;; Created: 16 Jun 2017 | ||
| 4 | ;; X-URL: https://github.com/bbatsov/projectile | ||
| 5 | ;;; Commentary: | ||
| 6 | ;; | ||
| 7 | ;; Useful functions for working within projects. | ||
| 8 | ;; | ||
| 9 | ;;; Code: | ||
| 10 | (use-package projectile | ||
| 11 | :ensure t | ||
| 12 | :diminish projectile-mode | ||
| 13 | :config | ||
| 14 | (projectile-global-mode)) | ||
| 15 | |||
| 16 | (provide 'projectile-conf) | ||
diff --git a/local-lib/python-conf.el b/local-lib/python-conf.el deleted file mode 100644 index 6f2a9fa..0000000 --- a/local-lib/python-conf.el +++ /dev/null | |||
| @@ -1,16 +0,0 @@ | |||
| 1 | ;;; python-conf.el --- configuration for the python language | ||
| 2 | ;; Author: jason <jason@zzq.org> | ||
| 3 | ;; Created: 16 Jun 2017 | ||
| 4 | ;;; Commentary: | ||
| 5 | ;; | ||
| 6 | ;;; Code: | ||
| 7 | |||
| 8 | (add-to-list 'package-archives | ||
| 9 | '("elpy" . "http://jorgenschaefer.github.io/packages/")) | ||
| 10 | |||
| 11 | (use-package elpy | ||
| 12 | :ensure t | ||
| 13 | :config | ||
| 14 | (elpy-enable)) | ||
| 15 | |||
| 16 | (provide 'python-conf) | ||
diff --git a/local-lib/rust-conf.el b/local-lib/rust-conf.el deleted file mode 100644 index 8cc2469..0000000 --- a/local-lib/rust-conf.el +++ /dev/null | |||
| @@ -1,32 +0,0 @@ | |||
| 1 | ;;; rust-conf.el --- configuration for the rust language | ||
| 2 | ;; Author: jason <jason@zzq.org> | ||
| 3 | ;; Created: 16 Jun 2017 | ||
| 4 | ;;; Commentary: | ||
| 5 | ;; | ||
| 6 | ;; Installation: | ||
| 7 | ;; * Install Rust: https://www.rust-lang.org/en-US/install.html | ||
| 8 | ;; * Install Racer: https://github.com/racer-rust/racer | ||
| 9 | ;; * Install the Rust source: rustup component add rust-src - This goes to: | ||
| 10 | ;; ~/.multirust/toolchains/[toolchain]/lib/rustlib/src/rust/src | ||
| 11 | ;; * Define the RUST_SRC_PATH environment var to the source directory | ||
| 12 | ;; | ||
| 13 | ;;; Code: | ||
| 14 | (use-package rust-mode | ||
| 15 | :ensure t | ||
| 16 | :commands (rust-mode)) | ||
| 17 | |||
| 18 | (use-package cargo | ||
| 19 | :ensure t | ||
| 20 | :commands (cargo-minor-mode)) | ||
| 21 | |||
| 22 | (use-package racer | ||
| 23 | :ensure t | ||
| 24 | :commands (racer-mode)) | ||
| 25 | |||
| 26 | (add-hook 'rust-mode-hook (lambda () | ||
| 27 | (progn | ||
| 28 | (racer-mode) | ||
| 29 | (cargo-minor-mode)))) | ||
| 30 | (add-hook 'racer-mode-hook #'company-mode) | ||
| 31 | |||
| 32 | (provide 'rust-conf) | ||
diff --git a/local-lib/version-control-conf.el b/local-lib/version-control-conf.el deleted file mode 100644 index a5e41df..0000000 --- a/local-lib/version-control-conf.el +++ /dev/null | |||
| @@ -1,16 +0,0 @@ | |||
| 1 | ;;; version-control-conf.el --- configuration for version control | ||
| 2 | ;; Author: jason <jason@zzq.org> | ||
| 3 | ;; Created: 16 Jun 2017 | ||
| 4 | ;;; Commentary: | ||
| 5 | ;; | ||
| 6 | ;; Configures version control (magit) | ||
| 7 | ;; | ||
| 8 | ;;; Code: | ||
| 9 | (use-package magit | ||
| 10 | :ensure t | ||
| 11 | :commands (magit-status magit-blame magit-log-buffer-file) | ||
| 12 | :bind (("C-c v s" . magit-status) | ||
| 13 | ("C-c v B" . magit-blame) | ||
| 14 | ("C-c v L" . magit-log-buffer-file))) | ||
| 15 | |||
| 16 | (provide 'version-control-conf) | ||