From fc88f9781a415e163874b503ed61711d4b7be0be Mon Sep 17 00:00:00 2001 From: jason Date: Wed, 21 Jun 2017 16:54:09 -0600 Subject: Update the config to a 'literate programming' style --- .gitignore | 13 ++ README.rst | 22 +++ config.org | 393 ++++++++++++++++++++++++++++++++++++++ init.el | 218 --------------------- local-lib/autocompletion-conf.el | 30 --- local-lib/persp-conf.el | 38 ---- local-lib/powerline-conf.el | 96 ---------- local-lib/projectile-conf.el | 16 -- local-lib/python-conf.el | 16 -- local-lib/rust-conf.el | 32 ---- local-lib/version-control-conf.el | 16 -- 11 files changed, 428 insertions(+), 462 deletions(-) create mode 100644 .gitignore create mode 100644 README.rst create mode 100644 config.org delete mode 100644 init.el delete mode 100644 local-lib/autocompletion-conf.el delete mode 100644 local-lib/persp-conf.el delete mode 100644 local-lib/powerline-conf.el delete mode 100644 local-lib/projectile-conf.el delete mode 100644 local-lib/python-conf.el delete mode 100644 local-lib/rust-conf.el delete mode 100644 local-lib/version-control-conf.el diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..894dbb4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,13 @@ +# Files and directories generated and managed by Emacs +auto-save-list +.org-id-locations +backups/ +elpa/ +recentf +savehist + +persp-confs/ +projectile-bookmarks.eld + +# Emacs, other packages, etc, modify the init.el so let that be managed locally +init.el \ No newline at end of file diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..b53bfaf --- /dev/null +++ b/README.rst @@ -0,0 +1,22 @@ +#################### +Jason's Emacs Config +#################### + +I use org-babel to create a literate config file. If you would just like to browse the config you can do so here: + +If you are looking to just blindly install and use it then clone this repository and load ``config.org`` at the top of your init file. + +.. code:: shell + + git clone git@beehive.io:jason/dotemacs.git ~/.emacs.d + cat > ~/.emacs.d/init.el <= and =C-c =. It is extra handy when some other +mode ruins your current window layout. + +#+BEGIN_SRC emacs-lisp +(winner-mode 1) +#+END_SRC +*** Local Elisp Code +Add directories where I store elisp code to the load path + +#+BEGIN_SRC emacs-lisp +(add-to-list 'load-path "~/.emacs.d/local-lib/") +#+END_SRC + +Include my custom functions + +#+BEGIN_SRC emacs-lisp +(require 'zzq-funcs) +#+END_SRC + +Usernames and passwords are stored in a non-published file +#+BEGIN_SRC emacs-lisp +(load "~/.emacs.d/secrets" t) +#+END_SRC +*** Keybindings +By default Emacs binds ~C-x k~ to ~kill-buffer~ which asks for the buffer you +want to close. 99.9% of the time I want to kill the buffer that is active so +make that the default behavior + +#+BEGIN_SRC emacs-lisp +(global-set-key (kbd "C-x k") 'kill-this-buffer) +#+END_SRC + +~ibuffer~ is a better buffer list utility so redefine the default buffer list +to it. + +#+BEGIN_SRC +;; Use ibuffer for the buffer list +(global-set-key (kbd "C-x C-b") 'ibuffer) +#+END_SRC +* Package Initalization +Define the package repositories + +#+BEGIN_SRC emacs-lisp +(setq package-archives '( + ("elpa" . "http://elpa.gnu.org/packages/") + ;; For org-mode + ("org" . "http://orgmode.org/elpa/") + ;; melpa builds git repositories and can be unstable + ("melpa" . "http://melpa.org/packages/") + ;; marmalade has version uploaded by the maintainers + ;; ("marmalade" . "https://marmalade-repo.org/packages/") + ;; melpa-stable builds from git tags but may be missing dependencies + ;; ("melpa-stable" . "https://stable.melpa.org/packages/") + )) +(package-initialize) +#+END_SRC + +I use jweigly's [[https://github.com/jwiegley/use-package][use-package]] to manage packages so it needs to be installed. + +#+BEGIN_SRC emacs-lisp +;; Packages are managed by the use-package package, so we need to make sure it's installed +(unless (package-installed-p 'use-package) + (package-refresh-contents) + (package-install 'use-package)) +(eval-when-compile + (require 'use-package)) +;; slight optimization for use-package's :bind directive +(require 'bind-key) +#+END_SRC +* Themes +[[https://github.com/synic/jbeans-emacs][jbeans]] is a jellybeans.vim clone maintained by synic + +#+BEGIN_SRC emacs-lisp +(require 'jbeans-theme) +(load-theme 'jbeans t) +#+END_SRC +* Auto-completion +I use [[https://company-mode.github.io/][company-mode]] for autocompletion. + +#+BEGIN_SRC emacs-lisp +(use-package company + :ensure t + :init + (setq + ;; Display the suggestion popup quickly + company-idle-delay 0.4 + ;; Display the suggestion popup after 1 character + company-minimum-prefix-length 1) + :config + (add-hook 'company-mode-hook '(lambda () + (progn + ;; I prefer to use TAB instead of RETURN to finish completion + (define-key company-active-map [return] nil) + (define-key company-active-map [tab] 'company-complete-selection))))) +#+END_SRC + +[[https://github.com/expez/company-quickhelp][Company-quickhelp]] displays documentation in a popup next to the match list + +#+BEGIN_SRC emacs-lisp +(use-package company-quickhelp + :ensure t + :config + (add-hook 'company-mode-hook '(lambda () + (progn + (company-quickhelp-mode))))) +#+END_SRC +* Version Control +Use [[https://magit.vc/][magit]] to supplement emacs built in version control system + +#+BEGIN_SRC emacs-lisp +(use-package magit + :ensure t + :commands (magit-status magit-blame magit-log-buffer-file) + :bind (("C-c v s" . magit-status) + ("C-c v B" . magit-blame) + ("C-c v L" . magit-log-buffer-file))) +#+END_SRC +* Packages +** org-mode +**** Setup +Start org-indent-mode. This displays a single indented star instead of many +stars in org-mode headings. + +#+BEGIN_SRC emacs-lisp +(setq org-startup-indented t + org-src-fontify-natively t) +#+END_SRC +**** Key Bindings +Define the keybindings for org-mode related things + +| Key | Function | Description | +|-----+------------+-----------------------------| +| F12 | org-agenda | Display the org-agenda menu | +| | | | + +#+BEGIN_SRC emacs-lisp +(global-set-key (kbd "") 'org-agenda) +#+END_SRC +**** Agenda +Rather than using ~C-[~ and ~C-]~ for adding files to the agenda manually this +defines directories that include all org files in the agenda. +#+BEGIN_SRC emacs-lisp +(setq org-agenda-files '("~/org/")) +#+END_SRC +**** HTMLize +Styles source code blocks when exporting an org file to HTML + +#+BEGIN_SRC emacs-lisp +(use-package htmlize + :ensure t) +#+END_SRC +** Paradox +[[https://github.com/Malabarba/paradox/][Paradox]] is a better emacs package manager. + +#+BEGIN_SRC emacs-lisp +(use-package paradox + :ensure t + :config + (paradox-enable)) +#+END_SRC +** avy +[[https://github.com/abo-abo/avy][avy]] is a quick way to jump around buffers + +#+BEGIN_SRC emacs-lisp +(use-package avy + :ensure t + :bind (("C-:" . avy-goto-line))) +#+END_SRC +** which-key +[[https://github.com/justbur/emacs-which-key][which-key]] displays a pop up with key binding hints as you press them + +#+BEGIN_SRC emacs-lisp +(use-package which-key + :ensure t + :diminish which-key-mode + :init + (setq which-key-special-keys nil + which-key-use-C-h-commands t + which-key-echo-keystrokes 0.02 + which-key-max-description-length 32 + which-key-sort-order 'which-key-key-order-alpha) + :config + (which-key-mode)) +#+END_SRC +** ivy/swiper +[[https://github.com/abo-abo/swiper][Ivy]], swiper, and counsel are a framework for autocompleting emacs things +#+BEGIN_SRC emacs-lisp +(use-package ivy + :ensure t + :pin elpa + :diminish ivy-mode + :bind (("C-s" . swiper) + ("M-x" . counsel-M-x) + ("C-x C-f" . counsel-find-file)) + :init + (setq + ;; Remove the ^ prefix + ivy-initial-inputs-alist nil + ;; Display recently opened files when switching buffers + ivy-use-virtual-buffers t + ;; Use ivy for magit + magit-completing-read-function 'ivy-completing-read + ;; Use ivy for projectile + projectile-completion-system 'ivy) + :config + (ivy-mode 1)) +#+END_SRC +** persp-mode +[[https://github.com/Bad-ptr/persp-mode.el][persp-mode]] enables "workspaces" within Emacs. This is similar to how a window +manager might have several desktops + +#+BEGIN_SRC emacs-lisp +(use-package persp-mode + :ensure t + :bind (([f8] . persp-switch)) + :init + (setq persp-nil-name "Home" + persp-auto-resume-time 0) + ;; Adding this so that capturing process is not interrupted with annoying + ;; prompts "Kill and Close" etc. + (setq persp-kill-foreign-buffer-action nil + ;; increase the default name length + persp-lighter '(:eval (format (propertize " #%.10s" + 'face (let ((persp (get-current-persp))) + (if persp + (if (persp-contain-buffer-p (current-buffer) persp) + 'persp-face-lighter-default + 'persp-face-lighter-buffer-not-in-persp) + 'persp-face-lighter-nil-persp))) + (safe-persp-name (get-current-persp))))) + :config + ;; Set the persp-mode keymap prefix to , p + (persp-set-keymap-prefix (kbd " p")) + (persp-mode 1)) +#+END_SRC +** powerline +[[https://github.com/milkypostman/powerline][powerline]] is a prettier mode line for emacs + +#+BEGIN_SRC emacs-lisp +(use-package powerline + :ensure t + :init + (setq powerline-default-separator 'wave + powerline-display-mule-info nil) + :config + (powerline-default-theme)) +#+END_SRC +** projectile +[[https://github.com/bbatsov/projectile][projectile]] adds some features around projects, for example finding only files +that are in the current project (defined by a .git directory). + +#+BEGIN_SRC emacs-lisp +(use-package projectile + :ensure t + :diminish projectile-mode + :config + (projectile-global-mode)) +#+END_SRC +* Languages +** Python +Elpy does a great job of supporting Python so I just use that. + +#+BEGIN_SRC emacs-lisp +(add-to-list 'package-archives + '("elpy" . "http://jorgenschaefer.github.io/packages/")) + +(use-package elpy + :ensure t + :config + (elpy-enable)) +#+END_SRC +** Rust +Installation: +- Install Rust: https://www.rust-lang.org/en-US/install.html +- Install Racer: https://github.com/racer-rust/racer +- Install the Rust source: =rustup component add rust-src= This goes to: + ~/.multirust/toolchains/[toolchain]/lib/rustlib/src/rust/src +- Define the =RUST_SRC_PATH= environment var to the source directory + +#+BEGIN_SRC emacs-lisp +(use-package rust-mode + :ensure t + :commands (rust-mode)) + +(use-package cargo + :ensure t + :commands (cargo-minor-mode)) + +(use-package racer + :ensure t + :commands (racer-mode)) + +(add-hook 'rust-mode-hook (lambda () + (racer-mode) + (cargo-minor-mode))) +(add-hook 'racer-mode-hook #'company-mode) +#+END_SRC diff --git a/init.el b/init.el deleted file mode 100644 index a1669b8..0000000 --- a/init.el +++ /dev/null @@ -1,218 +0,0 @@ -;;; init.el --- emacs start up -;; Author: jason -;; Created: 15 Jun 2017 -;; Version: 2 -;; Keywords: -;; X-URL: https://beehive.io/jason/emacs.d/ -;;; Commentary: -;; -;;; Code: -(defconst emacs-start-time (current-time)) -(setq inhibit-startup-screen t ;; Hide the default startup screen - savehist-file "~/.emacs.d/savehist" - ;; Define where to store recovery files - backup-directory-alist '(("." . "~/.emacs.d/backups")) - ;; Use version numbers for backups. - version-control t - ;; Number of newest versions to keep. - kept-new-versions 10 - ;; Number of oldest versions to keep. - kept-old-versions 0 - ;; Don't ask to delete excess backup versions. - delete-old-versions -1 - ;; Copy all files, don't rename them. - backup-by-copying t - ;; Make backups files under version control. - vc-make-backup-files t - ;; Don't confirm following when opening a symlink - vc-follow-symlinks t) - -(setq package-archives '(("elpa" . "http://elpa.gnu.org/packages/") - ;; For org-mode - ("org" . "http://orgmode.org/elpa/") - ;; melpa builds git repositories and can be unstable - ("melpa" . "http://melpa.org/packages/") - ;; marmalade has maintainers upload versions - ;; ("marmalade" . "https://marmalade-repo.org/packages/") - ;; melpa-stable builds from git tags but may be missing dependencies - ;; ("melpa-stable" . "https://stable.melpa.org/packages/") - ;; Elpy packages for the Python language - ;; ("elpy" . "https://jorgenschaefer.github.io/packages/") - )) - -;; Initializes installed packages -(package-initialize) - -;; Packages are managed by the use-package package, so we need to make sure it's installed -(unless (package-installed-p 'use-package) - (package-refresh-contents) - (package-install 'use-package)) -(eval-when-compile - (require 'use-package)) -;; slight optimization for use-package's :bind directive -(require 'bind-key) - -;; Add local library to the load path -(add-to-list 'load-path "~/.emacs.d/local-lib/") -;; Usernames and passwords are stored in a file that isn't sync'd to VC -(load "~/.emacs.d/secrets" t) - -;; My misc functions -(require 'zzq-funcs) - -(add-hook 'after-init-hook - (lambda () - (progn - ;; Maximize the frame on startup - (toggle-frame-maximized) - ;; Always ensure packages are installed if they are defined with use-package - ;; (setq use-package-always-ensure t) - - ;; Set default encoding to UTF-8 - (set-language-environment "UTF-8") - (set-default-coding-systems 'utf-8) - (setq default-buffer-file-coding-system 'utf-8-unix) - ;; Hide the toolbar - (tool-bar-mode -1) - ;; Hide the scrollbar - (scroll-bar-mode -1) - ;; no beep and no blinking cursor - (setq ring-bell-function 'ignore - visible-bell nil - ;; display the full file path in the titlebar - frame-title-format - (list (format "%s %%S: %%j " (system-name)) - '(buffer-file-name "%f" (dired-directory dired-directory "%b")))) - - ;; Show matched parens - (show-paren-mode t) - ;; Allow undoing/redoing of window layouts with C-c left/right arrows - (winner-mode 1) - ;; Let y and n be good enough for yes and no questions - (fset 'yes-or-no-p 'y-or-n-p) - ;; Auto-refresh files changed on the file system - (global-auto-revert-mode 1) - ;; Save commands and their history - (savehist-mode +1) - (setq savehist-save-minibuffer-history +1) - (setq savehist-additional-variables - '(kill-ring - search-ring - regexp-search-ring)) - ;; Allow mouse support in xterm - (xterm-mouse-mode 1) - ;; Automatically close parens when opening them - (electric-pair-mode 1) - ;; Ovewrite selected regions with what you're typing/pasting/etc - (delete-selection-mode 1) - ;; A region is only active when it is highlighted (mimics other editors) - (transient-mark-mode 1) - ;; Kill the current buffer by default - (global-set-key (kbd "C-x k") 'kill-this-buffer) - ;; Use ibuffer for the buffer list - (global-set-key (kbd "C-x C-b") 'ibuffer) - ;;;;;;;;;;; - ;; Hooks ;; - ;;;;;;;;;;; - (add-hook 'write-file-hooks - '(lambda () - ;; delete trailing whitespace from all files - (delete-trailing-whitespace))) - ;;;;;;;;;;;; - ;; Themes ;; - ;;;;;;;;;;;; - (use-package jbeans-theme - :ensure t - :config - (load-theme 'jbeans)) - ;;;;;;;;;;;;;; - ;; Packages ;; - ;;;;;;;;;;;;;; - ;; paradox - A better emacs package manager - (use-package paradox - :ensure t - :config - ;; Use paradox as the default package manager - (paradox-enable)) - ;; which-key - Displays a pop up with hints when pushing key bindings - (use-package which-key - :ensure t - :diminish which-key-mode - :init - (setq which-key-special-keys nil - which-key-use-C-h-commands t - which-key-echo-keystrokes 0.02 - which-key-max-description-length 32 - which-key-sort-order 'which-key-key-order-alpha) - :config - (which-key-mode)) - ;; Ivy, swiper, and counsel for autocompleting emacs things - (use-package ivy - :ensure t - :pin elpa - :diminish ivy-mode - :bind (("C-s" . swiper) - ("M-x" . counsel-M-x) - ("C-x C-f" . counsel-find-file)) - :init - ;; Remove the ^ prefix - (setq ivy-initial-inputs-alist nil - ;; Display recently opened files when switching buffers - ivy-use-virtual-buffers t - ;; Use ivy for magit - magit-completing-read-function 'ivy-completing-read - ;; Use ivy for projectile - projectile-completion-system 'ivy) - :config - (ivy-mode 1)) - ;; avy - A quick way to jump around buffers - (use-package avy - :ensure t - :bind (("C-:" . avy-goto-line))) - - ;; Other packages - ;; autocompletion - auto-completion for programming languages - (require 'autocompletion-conf) - ;; persp - virtual workspaces - (require 'persp-conf) - ;; powerline - prettier modeline - (require 'powerline-conf) - ;; projectile - utilities for working with projects - (require 'projectile-conf) - (require 'version-control-conf) - - ;; Languages - (require 'python-conf) - (require 'rust-conf) - - (message "Emacs loaded in %.3fs" - (/ (- (zzq/time-to-msec (current-time)) (zzq/time-to-msec emacs-start-time)) 1000.0)) - ))) ;; End progn/lambda/add-hook after-init-hook - -(custom-set-variables - ;; custom-set-variables 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. - '(custom-safe-themes - (quote - ("64f2981274fd8740b794bce9feee7949ed87b88fc0b4654bd98594e1aa81abcd" default))) - '(package-selected-packages - (quote - (elpy magit racer cargo rust-mode company-quickhelp company projectile persp-mode avy ivy powerline which-key paradox use-package jbeans-theme))) - '(paradox-github-token t) - '(safe-local-variable-values - (quote - ((eval let - ((virtualenv "~/.virtualenvs/eb")) - (setq-local pythonic-environment virtualenv) - (my/advise-pythonic-activate virtualenv))))) - '(show-paren-mode t) - '(tool-bar-mode nil)) - -(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. - '(default ((t (:family "Inconsolata" :foundry "PfEd" :slant normal :weight normal :height 98 :width normal))))) 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 @@ -;;; autocompletion-conf.el --- configuration for language auto-complete -;; Author: jason -;; Created: 16 Jun 2017 -;;; Commentary: -;; -;; Configures the auto-completion framework (company-mode) -;; -;;; Code: -(use-package company - :ensure t - :init - (setq - ;; Display the suggestion popup quickly - company-idle-delay 0.4 - ;; Display the suggestion popup after 1 character - company-minimum-prefix-length 1) - :config - (add-hook 'company-mode-hook '(lambda () - (progn - ;; I prefer to use TAB instead of RETURN to finish completion - (define-key company-active-map [return] nil) - (define-key company-active-map [tab] 'company-complete-selection))))) -;; Display documentation in a popup -(use-package company-quickhelp - :ensure t - :config - (add-hook 'company-mode-hook '(lambda () - (progn - (company-quickhelp-mode))))) -(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 @@ -;;; persp-conf.el --- configuration for persp-mode -;; Author: jason -;; Created: 16 Jun 2017 -;; X-URL: https://github.com/Bad-ptr/persp-mode.el -;;; Commentary: -;; -;; Enables different "workspaces" within Emacs. Similar to how a window manager -;; might have several desktops -;; -;; Bindings: -;; * - Switch between perspectives -;; * , p - Manage perspectives -;; -;;; Code: -(use-package persp-mode - :ensure t - :bind (([f8] . persp-switch)) - :init - (setq persp-nil-name "Home" - persp-auto-resume-time 0) - ;; Adding this so that capturing process is not interrupted with annoying - ;; prompts "Kill and Close" etc. - (setq persp-kill-foreign-buffer-action nil - ;; increase the default name length - persp-lighter '(:eval (format (propertize " #%.10s" - 'face (let ((persp (get-current-persp))) - (if persp - (if (persp-contain-buffer-p (current-buffer) persp) - 'persp-face-lighter-default - 'persp-face-lighter-buffer-not-in-persp) - 'persp-face-lighter-nil-persp))) - (safe-persp-name (get-current-persp))))) - :config - ;; Set the persp-mode keymap prefix to , p - (persp-set-keymap-prefix (kbd " p")) - (persp-mode 1)) - -(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 @@ -;;; powerline-conf.el --- configuration for powerline -;; Author: jason -;; Created: 16 Jun 2017 -;; X-URL: https://github.com/milkypostman/powerline -;;; Commentary: -;; -;; Styles the Emacs mode line -;; -;;; Code: -(defface my/modeline-narrow-face - '((t (:foreground "black" :background "yellow3"))) - "todo/fixme highlighting." - :group 'faces) - -(defface my/modeline-read-only-face - '((t (:foreground "black" :background "orange4"))) - "Read-only buffer highlighting." - :group 'faces) - -(defface my/modeline-modified-face - '((t (:foreground "gray80" :background "red4"))) - "Modified buffer highlighting." - :group 'faces) - -(defun powerline-my-theme () - "Setup the default mode-line." - (interactive) - (setq-default mode-line-format - '("%e" - (:eval - (let* ((active (powerline-selected-window-active)) - (mode-line (if active 'mode-line 'mode-line-inactive)) - (face1 (if active 'powerline-active1 'powerline-inactive1)) - (face2 (if active 'powerline-active2 'powerline-inactive2)) - (separator-left (intern (format "powerline-%s-%s" - (powerline-current-separator) - (car powerline-default-separator-dir)))) - (separator-right (intern (format "powerline-%s-%s" - (powerline-current-separator) - (cdr powerline-default-separator-dir)))) - (lhs (append (list (powerline-raw " ")) - (let ((buffer-modified-str (if buffer-read-only - (if (buffer-modified-p) "%%*" "%%%%") - (if (buffer-modified-p) "**" "--")))) - (if buffer-read-only - (list (powerline-raw buffer-modified-str 'my/modeline-read-only-face)) - (if (buffer-modified-p) - (list (powerline-raw buffer-modified-str 'my/modeline-modified-face)) - (list (powerline-raw buffer-modified-str nil)))) - ) - (list - (when powerline-display-buffer-size - (powerline-buffer-size nil 'l)) - (when powerline-display-mule-info - (powerline-raw mode-line-mule-info nil 'l)) - (powerline-buffer-id nil 'l) - (when (and (boundp 'which-func-mode) which-func-mode) - (powerline-raw which-func-format nil 'l)) - (powerline-raw " ") - (funcall separator-left mode-line face1) - (when (and (boundp 'erc-track-minor-mode) erc-track-minor-mode) - (powerline-raw erc-modified-channels-object face1 'l)) - (powerline-major-mode face1 'l) - (powerline-process face1) - (powerline-minor-modes face1 'l) - (powerline-narrow face1 'l) - (powerline-raw " " face1) - (funcall separator-left face1 face2) - (powerline-vc face2 'r) - (when (bound-and-true-p nyan-mode) - (powerline-raw (list (nyan-create)) face2 'l))))) - (rhs (list (powerline-raw global-mode-string face2 'r) - ;; (funcall separator-right face2 face1) - ;; (unless window-system - ;; (powerline-raw (char-to-string #xe0a1) face1 'l)) - (powerline-raw "%4l" face1 'l) - (powerline-raw ":" face1 'l) - (powerline-raw "%3c" face1 'r) - (funcall separator-right face1 mode-line) - (powerline-raw " ") - (powerline-raw "%6p" nil 'r) - (when powerline-display-hud - (powerline-hud face2 face1))))) - (concat (powerline-render lhs) - (powerline-fill face2 (powerline-width rhs)) - (powerline-render rhs))))))) - -(use-package powerline - :ensure t - :config - (setq powerline-default-separator 'wave - powerline-display-mule-info nil) - - (powerline-my-theme)) - -(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 @@ -;;; projectile-conf.el --- configuration for projectile-mode -;; Author: jason -;; Created: 16 Jun 2017 -;; X-URL: https://github.com/bbatsov/projectile -;;; Commentary: -;; -;; Useful functions for working within projects. -;; -;;; Code: -(use-package projectile - :ensure t - :diminish projectile-mode - :config - (projectile-global-mode)) - -(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 @@ -;;; python-conf.el --- configuration for the python language -;; Author: jason -;; Created: 16 Jun 2017 -;;; Commentary: -;; -;;; Code: - -(add-to-list 'package-archives - '("elpy" . "http://jorgenschaefer.github.io/packages/")) - -(use-package elpy - :ensure t - :config - (elpy-enable)) - -(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 @@ -;;; rust-conf.el --- configuration for the rust language -;; Author: jason -;; Created: 16 Jun 2017 -;;; Commentary: -;; -;; Installation: -;; * Install Rust: https://www.rust-lang.org/en-US/install.html -;; * Install Racer: https://github.com/racer-rust/racer -;; * Install the Rust source: rustup component add rust-src - This goes to: -;; ~/.multirust/toolchains/[toolchain]/lib/rustlib/src/rust/src -;; * Define the RUST_SRC_PATH environment var to the source directory -;; -;;; Code: -(use-package rust-mode - :ensure t - :commands (rust-mode)) - -(use-package cargo - :ensure t - :commands (cargo-minor-mode)) - -(use-package racer - :ensure t - :commands (racer-mode)) - -(add-hook 'rust-mode-hook (lambda () - (progn - (racer-mode) - (cargo-minor-mode)))) -(add-hook 'racer-mode-hook #'company-mode) - -(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 @@ -;;; version-control-conf.el --- configuration for version control -;; Author: jason -;; Created: 16 Jun 2017 -;;; Commentary: -;; -;; Configures version control (magit) -;; -;;; Code: -(use-package magit - :ensure t - :commands (magit-status magit-blame magit-log-buffer-file) - :bind (("C-c v s" . magit-status) - ("C-c v B" . magit-blame) - ("C-c v L" . magit-log-buffer-file))) - -(provide 'version-control-conf) -- cgit v1.2.1