2017-05-29 09:35:22 +00:00
#+TITLE : Parinfer layer
2019-05-02 21:49:30 +00:00
#+TAGS : layer|misc
2019-05-07 20:05:06 +00:00
* Table of Contents :TOC_5_gh:noexport:
2017-05-29 09:35:22 +00:00
- [[#description ][Description ]]
2017-10-04 08:13:01 +00:00
- [[#features ][Features: ]]
2017-05-29 09:35:22 +00:00
- [[#install ][Install ]]
2022-08-04 22:32:27 +00:00
- [[#prerequisites ][Prerequisites ]]
- [[#dotfile ][Dotfile ]]
2017-05-29 09:35:22 +00:00
- [[#configuration ][Configuration ]]
- [[#key-bindings ][Key bindings ]]
* Description
This layer provides an implementation of [[https://shaunlebron.github.io/parinfer/ ][parinfer ]], a lisp editing paradigm that
controls indentation based on parentheses or vice versa.
2017-10-04 08:13:01 +00:00
** Features:
2022-08-04 22:32:27 +00:00
- Automatic management of parenthesis in Clojure, Emacs Lisp, Common Lisp and
Scheme following the parinfer editing paradigm.
2021-03-07 21:22:03 +00:00
- Powered by a native library in the background
2017-10-04 08:13:01 +00:00
2017-05-29 09:35:22 +00:00
* Install
2022-08-04 22:32:27 +00:00
** Prerequisites
- This layer requires =parinfer-rust= library being installed. See [[https://github.com/eraserhd/parinfer-rust#installing ][here ]] for the
dependencies.
- The =parinfer-rust-mode= package requires Emacs compiled with dynamic module
support, which can be verified by existence of =MODULES= in the variable
=system-configuration-features= .
- Currently, ony *nix system is supported.
** Dotfile
2017-05-29 09:35:22 +00:00
To use this configuration layer, add it to your =~/.spacemacs= . You will need to
add =parinfer= to the existing =dotspacemacs-configuration-layers= list in this
file.
2022-08-04 22:32:27 +00:00
#+BEGIN_SRC emacs-lisp
(setq-default dotspacemacs-configuration-layers '(pdf))
#+END_SRC
2017-05-29 09:35:22 +00:00
* Configuration
2022-08-04 22:32:27 +00:00
This package comes pre-configured to auto install the native library in your
=spacemacs-cache-directory= . If you don't want this, see [[https://github.com/justinbarclay/parinfer-rust-mode#option-2-building-library-from-sources ][here ]] for a manual
install option.
=parinfer-rust-mode= operates under [[https://github.com/justinbarclay/parinfer-rust-mode#modes ][three modes ]]. By default, it starts in
=smart-mode= , and can be toggled via =SPC t P= .
2017-05-29 09:35:22 +00:00
* Key bindings
2021-03-07 21:22:03 +00:00
| Key binding | Description |
|-------------+-----------------------------------------------------|
| ~SPC t P~ | Toggle between parinfer smart indent and paren mode |