parinfer: cleaning up
- Updated layer README.org to include prerequisites - Removed unnecessary layer config variables which are mere re-naming of customization variables from `parinfer-rust-mode`. - Removed the image.
This commit is contained in:
parent
fcf3aa7c9e
commit
a611a602c0
|
@ -2,12 +2,12 @@
|
|||
|
||||
#+TAGS: layer|misc
|
||||
|
||||
[[file:img/parinfer.png]]
|
||||
|
||||
* Table of Contents :TOC_5_gh:noexport:
|
||||
- [[#description][Description]]
|
||||
- [[#features][Features:]]
|
||||
- [[#install][Install]]
|
||||
- [[#prerequisites][Prerequisites]]
|
||||
- [[#dotfile][Dotfile]]
|
||||
- [[#configuration][Configuration]]
|
||||
- [[#key-bindings][Key bindings]]
|
||||
|
||||
|
@ -16,24 +16,35 @@ This layer provides an implementation of [[https://shaunlebron.github.io/parinfe
|
|||
controls indentation based on parentheses or vice versa.
|
||||
|
||||
** Features:
|
||||
- Automatic management of parenthesis in clojure, emacs lisp, common-lisp and scheme following the parinfer editing paradigm.
|
||||
- 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
|
||||
|
||||
* Install
|
||||
** 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
|
||||
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.
|
||||
|
||||
* Configuration
|
||||
This package comes preconfigured to auto install the native library in your cache
|
||||
directory. If this is not desired set the variables =parinfer-auto-download= to =nil=
|
||||
and set =parinfer-library= to the path of your local installation.
|
||||
This mode uses the new =smart-mode= instead of the =indent-mode= traditionally
|
||||
used with =parinfer=. For the autoinstallation =curl= is required to be in your
|
||||
path.
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq-default dotspacemacs-configuration-layers '(pdf))
|
||||
#+END_SRC
|
||||
|
||||
If you still want to manually configure it please check the respective package
|
||||
repo [[https://github.com/justinbarclay/parinfer-rust-mode][here]].
|
||||
* Configuration
|
||||
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=.
|
||||
|
||||
* Key bindings
|
||||
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
;;; config.el --- parinfer layer config file for Spacemacs.
|
||||
;;
|
||||
;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
|
||||
;;
|
||||
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
||||
;; URL: https://github.com/syl20bnr/spacemacs
|
||||
;;
|
||||
;; This file is not part of GNU Emacs.
|
||||
;;
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation, either version 3 of the License, or
|
||||
;; (at your option) any later version.
|
||||
;;
|
||||
;; This program is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU General Public License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
(spacemacs|defc parinfer-auto-download t
|
||||
"If non nil auto install the parinfer rust library"
|
||||
'boolean nil nil)
|
||||
|
||||
(spacemacs|defc parinfer-library nil
|
||||
"If non nil allows to set a custom library name and folder
|
||||
|
||||
Setting a path here and disabling `parinfer-auto-download'
|
||||
allows to use a local version of the library."
|
||||
'(file :must-match t) nil nil)
|
Binary file not shown.
Before Width: | Height: | Size: 10 KiB |
|
@ -1,4 +1,4 @@
|
|||
;;; packages.el --- parinfer layer packages file for Spacemacs.
|
||||
;;; packages.el --- parinfer layer packages file for Spacemacs. -*- lexical-binding: t -*-
|
||||
;;
|
||||
;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
|
||||
;;
|
||||
|
@ -20,6 +20,9 @@
|
|||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;;; Code:
|
||||
|
||||
(defconst parinfer-packages
|
||||
'(parinfer-rust-mode))
|
||||
|
@ -27,21 +30,19 @@
|
|||
(defun parinfer/init-parinfer-rust-mode ()
|
||||
(use-package parinfer-rust-mode
|
||||
:defer t
|
||||
:diminish parinfer-rust-mode
|
||||
:spacediminish t
|
||||
:hook emacs-lisp-mode clojure-mode scheme-mode common-lisp-mode
|
||||
:custom
|
||||
(parinfer-rust-auto-download t)
|
||||
(parinfer-rust-library-directory (expand-file-name (file-name-as-directory "parinfer-rust")
|
||||
spacemacs-cache-directory))
|
||||
:init
|
||||
(progn
|
||||
(setq parinfer-rust-auto-download parinfer-auto-download)
|
||||
(if parinfer-rust-auto-download
|
||||
(setq parinfer-rust-library-directory
|
||||
(concat spacemacs-cache-directory
|
||||
"parinfer-rust/"))
|
||||
(when parinfer-library
|
||||
(setq parinfer-rust-library parinfer-library)))
|
||||
(spacemacs|add-toggle parinfer-smart-indent
|
||||
:evil-leader "tP"
|
||||
:documentation "Enable Parinfer Smart Indent Mode."
|
||||
:if (bound-and-true-p parinfer-rust-mode)
|
||||
:status (eq parinfer-rust--mode 'smart)
|
||||
:on (parinfer-rust-toggle-paren-mode)
|
||||
:off (parinfer-rust-toggle-paren-mode)))))
|
||||
(spacemacs|add-toggle parinfer-smart-indent
|
||||
:evil-leader "tP"
|
||||
:documentation "Enable Parinfer Smart Indent Mode."
|
||||
:if (bound-and-true-p parinfer-rust-mode)
|
||||
:status (eq parinfer-rust--mode 'smart)
|
||||
:on (parinfer-rust-toggle-paren-mode)
|
||||
:off (parinfer-rust-toggle-paren-mode))))
|
||||
|
||||
;;; packages.el ends here
|
||||
|
|
Loading…
Reference in New Issue