diff options
author | William Carroll <wpcarro@gmail.com> | 2019-10-09T11·13+0100 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2019-12-24T15·21+0000 |
commit | 6b456c1b7a4f6899f063a6e65355af51901d9c7a (patch) | |
tree | cfc70d74818ae9fabdbbfb0cf16cce092e4c1a09 /configs/shared/.emacs.d/wpc/packages/wpc-lisp.el | |
parent | a7c72adb2ebec1e497fc040eaf3551d564d61a5b (diff) |
Massive configuration overhaul
Currently paying the price of months of non-diligent git usage. Here's what has changed. - Theming support in Gvcci and wpgtk - Dropping support for i3 - Supporting EXWM - Many Elisp modules - Collapsed redundant directories in ./configs
Diffstat (limited to 'configs/shared/.emacs.d/wpc/packages/wpc-lisp.el')
-rw-r--r-- | configs/shared/.emacs.d/wpc/packages/wpc-lisp.el | 114 |
1 files changed, 114 insertions, 0 deletions
diff --git a/configs/shared/.emacs.d/wpc/packages/wpc-lisp.el b/configs/shared/.emacs.d/wpc/packages/wpc-lisp.el new file mode 100644 index 000000000000..553dff1acbd9 --- /dev/null +++ b/configs/shared/.emacs.d/wpc/packages/wpc-lisp.el @@ -0,0 +1,114 @@ +;;; lisp.el --- Generic LISP preferences -*- lexical-binding: t -*- +;; Author: William Carroll <wpcarro@gmail.com> + +;; parent (up) +;; child (down) +;; prev-sibling (left) +;; next-sibling (right) + +;;; Code: + +(defconst wpc/lisp-mode-hooks + '(lisp-mode-hook + emacs-lisp-mode-hook + clojure-mode-hook + clojurescript-mode-hook + racket-mode-hook) + "List of LISP modes.") + +(use-package racket-mode + :config + (general-define-key + :keymaps 'racket-mode-map + :states 'normal + :prefix "<SPC>" + "x" #'racket-send-definition) + (general-define-key + :keymaps 'racket-mode-map + :states 'normal + :prefix "<SPC>" + "X" #'racket-run) + (general-define-key + :keymaps 'racket-mode-map + :states 'normal + :prefix "<SPC>" + "d" #'racket-describe) + (setq racket-program "~/.nix-profile/bin/racket")) + +(use-package lispyville + :init + (defconst lispyville-key-themes + '(c-w + operators + text-objects + ;; Disabling this because I don't enjoy the way it moves around comments. + ;; atom-motions + prettify + commentary + slurp/barf-cp + wrap + additional + additional-insert + additional-wrap + escape) + "All available key-themes in Lispyville.") + :config + (general-add-hook wpc/lisp-mode-hooks #'lispyville-mode) + (lispyville-set-key-theme lispyville-key-themes) + (progn + ;; + (general-define-key + :keymaps 'lispyville-mode-map + :states 'motion + ;; first unbind + "M-h" nil + "M-l" nil) + (general-define-key + :keymaps 'lispyville-mode-map + :states 'normal + ;; first unbind + "M-j" nil + "M-k" nil + ;; second rebind + ;; TODO: Rebind to something that doesn't conflict with window resizing. + ;; "C-M-h" #'lispyville-drag-backward + ;; "C-M-l" #'lispyville-drag-forward + ))) + +;; deletes all bindings of f->kbd +;; binds kbd-> +;; (kbd/bind-function->key +;; :keymap 'lispyville-mode-map +;; :states 'motion +;; #'lispyville-drag-backward "H") + +;; Elisp +(use-package elisp-slime-nav + :config + (general-add-hook 'emacs-lisp-mode #'ielm-mode)) + +;; TODO: Should I be using `general-define-key' or `evil-leader/set-key'? My +;; gut say `general-define-key'. +(general-define-key + :keymaps 'emacs-lisp-mode-map + :states 'normal + :prefix "<SPC>" + "x" #'eval-defun) + +(general-define-key + :keymaps 'emacs-lisp-mode-map + :states 'normal + :prefix "<SPC>" + "X" #'eval-buffer) + +(general-define-key + :keymaps 'emacs-lisp-mode-map + :states 'normal + :prefix "<SPC>" + "d" (lambda () + (interactive) + (with-current-buffer (current-buffer) + (helpful-function (symbol-at-point))))) + +(provide 'wpc-lisp) +;;; wpc-lisp.el ends here |