[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/smartparens 37f91720fe 4/4: docs: add example of use-packa
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/smartparens 37f91720fe 4/4: docs: add example of use-package configuration |
Date: |
Sat, 21 Oct 2023 10:01:46 -0400 (EDT) |
branch: elpa/smartparens
commit 37f91720fe040a878600fc615bdf442f7ea316e6
Author: Matus Goljer <matus.goljer@gmail.com>
Commit: Matus Goljer <matus.goljer@gmail.com>
docs: add example of use-package configuration
Fixes #1088
---
README.md | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 54fcf3a0eb..784b565869 100644
--- a/README.md
+++ b/README.md
@@ -67,6 +67,17 @@ You may want to try `smartparens-strict-mode`. This enforces
that
pairs are always balanced, so commands like `kill-line` keep your code
well-formed.
+You can also use `use-package` to install and setup `smartparens`. A minimal
config is:
+
+``` elisp
+(use-package smartparens-mode
+ :ensure smartparens ;; install the package
+ :hook (prog-mode text-mode markdown-mode) ;; add `smartparens-mode` to these
hooks
+ :config
+ ;; load default config
+ (require 'smartparens-config))
+```
+
## Usage
Inside Emacs, `M-x sp-cheat-sheet` will show you all the commands
@@ -132,7 +143,6 @@ If you want to support this project, you can:
Other Emacs projects that deal with pairs include:
* [autopair](https://github.com/capitaomorte/autopair)
-* [textmate](http://code.google.com/p/emacs-textmate/)
* [wrap-region](https://github.com/rejeep/wrap-region)
* [electric-pair-mode](http://www.emacswiki.org/emacs/ElectricPair)
* [paredit](http://emacswiki.org/emacs/ParEdit)