This commit is contained in:
ry
2022-01-11 18:05:13 -08:00
parent 2046befee2
commit 8e7b654716
846 changed files with 71287 additions and 4 deletions

View File

@@ -0,0 +1,53 @@
#+TITLE: editor/lispy
#+DATE: October 27, 2018
#+SINCE: v2.0
#+STARTUP: inlineimages
* Table of Contents :TOC_3:noexport:
- [[#description][Description]]
- [[#prerequisites][Prerequisites]]
- [[#troubleshooting][Troubleshooting]]
- [[#mouse-wheel-and-wrapadditional-wrap-key-themes-in-tty-emacs-2573][Mouse wheel and =wrap=/=additional-wrap= key themes in TTY Emacs (#2573)]]
* Description
This module adds [[https://github.com/noctuid/lispyville][lispy]] key functionality in Lisp languages.
This includes:
- Common Lisp
- Emacs Lisp
- Scheme
- Racket
- [[http://docs.hylang.org/en/stable/][Hy]]
- [[http://lfe.io/][LFE]]
- Clojure
- [[https://fennel-lang.org][Fennel]]
If evil is enabled, lispyville would also be activated for every mode where
lispy is active
The default key themes that are set are as follows:
#+BEGIN_SRC emacs-lisp
'((operators normal)
c-w
(prettify insert)
(atom-movement normal visual)
slurp/barf-lispy
additional
additional-insert)
#+END_SRC
To change the key themes set ~lispyville-key-theme~. Think of
~lispyville-key-theme~ as the equivalent of ~parinfer-extensions~. See
lispyville's [[https://github.com/noctuid/lispyville/blob/master/README.org][README]] for more info on the specific keybindings of each key theme
(starting [[https://github.com/noctuid/lispyville#operators-key-theme][here]]).
* Prerequisites
This module has no prerequisites.
* Troubleshooting
** Mouse wheel and =wrap=/=additional-wrap= key themes in TTY Emacs ([[https://github.com/hlissner/doom-emacs/issues/2573][#2573]])
lispyville binds =M-[= to ~lispyville-wrap-brackets~ when the =wrap= or
=additional-wrap= key theme are enabled. In terminal Emacs, this is the key
Emacs receives when you scroll with your mouse wheel.

View File

@@ -0,0 +1,44 @@
;;; editor/lispy/config.el -*- lexical-binding: t; -*-
(use-package! lispy
:hook ((lisp-mode . lispy-mode)
(emacs-lisp-mode . lispy-mode)
(ielm-mode . lispy-mode)
(scheme-mode . lispy-mode)
(racket-mode . lispy-mode)
(hy-mode . lispy-mode)
(lfe-mode . lispy-mode)
(dune-mode . lispy-mode)
(clojure-mode . lispy-mode)
(fennel-mode . lispy-mode))
:init
(add-hook! 'eval-expression-minibuffer-setup-hook
(defun doom-init-lispy-in-eval-expression-h ()
"Enable `lispy-mode' in the minibuffer for `eval-expression'."
(lispy-mode)
;; When `lispy-key-theme' has `parinfer', the TAB key doesn't do
;; completion, neither (kbd "<tab>"/"TAB"/"C-i")/[tab]/"\C-i" works in
;; terminal as tested so remapping is used as a workaround
(local-set-key (vector 'remap (lookup-key lispy-mode-map (kbd "TAB"))) #'completion-at-point)))
:config
(setq lispy-close-quotes-at-end-p t)
(add-hook 'lispy-mode-hook #'turn-off-smartparens-mode))
(use-package! lispyville
:when (featurep! :editor evil)
:hook (lispy-mode . lispyville-mode)
:init
(setq lispyville-key-theme
'((operators normal)
c-w
(prettify insert)
(atom-movement t)
slurp/barf-lispy
additional
additional-insert))
:config
(lispyville-set-key-theme)
(add-hook! 'evil-escape-inhibit-functions
(defun +lispy-inhibit-evil-escape-fn ()
(and lispy-mode (evil-insert-state-p)))))

View File

@@ -0,0 +1,6 @@
;; -*- no-byte-compile: t; -*-
;;; editor/lispyville/packages.el
(package! lispy :pin "bf315768020f98f6139d5f722bd365f1ddd1fb52")
(when (featurep! :editor evil)
(package! lispyville :pin "9c14bed0359f659e246d345c706f895737c3d172"))