Table of Contents

Parinfer layer

Table of ContentsClose

1. Description

This layer provides an implementation of parinfer, a lisp editing paradigm that controls indentation based on parentheses or vice versa.

1.1. Features:

  • Automatic management of parenthesis in Clojure, Emacs Lisp, Common Lisp and Scheme following the parinfer editing paradigm.
  • Powered by a native library in the background

2. Install

2.1. Prerequisites

  • This layer requires parinfer-rust library being installed. See 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.

2.2. Dotfile

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.

(setq-default dotspacemacs-configuration-layers '(pdf))

3. Configuration

This package comes pre-configured to auto install the native library in your spacemacs-cache-directory. If you don't want this, see here for a manual install option.

parinfer-rust-mode operates under three modes. By default, it starts in smart-mode, and can be toggled via SPC t P.

4. Key bindings

Key binding Description
SPC t P Toggle between parinfer smart indent and paren mode

Author: root

Created: 2024-04-03 Wed 19:39