Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/karimaziev/prettier-elisp
Minor mode to format emacs lisp code
https://github.com/karimaziev/prettier-elisp
emacs
Last synced: 4 days ago
JSON representation
Minor mode to format emacs lisp code
- Host: GitHub
- URL: https://github.com/karimaziev/prettier-elisp
- Owner: KarimAziev
- License: gpl-3.0
- Created: 2020-09-29T10:45:28.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-11-09T13:01:28.000Z (5 days ago)
- Last Synced: 2024-11-09T13:37:36.523Z (5 days ago)
- Topics: emacs
- Language: Emacs Lisp
- Homepage:
- Size: 175 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
- License: LICENSE
Awesome Lists containing this project
README
#+OPTIONS: ^:nil tags:nil num:nil
* About
A minor mode for formatting Emacs Lisp code.
[[./prettier-elisp-demo.gif]]
* Table of Contents :TOC_2_gh:QUOTE:
#+BEGIN_QUOTE
- [[#about][About]]
- [[#requirements][Requirements]]
- [[#installation][Installation]]
- [[#with-use-package-and-straightel][With use-package and straight.el]]
- [[#manual-installation][Manual installation]]
- [[#usage][Usage]]
- [[#customization][Customization]]
#+END_QUOTE* Requirements
| Name | Version |
|-------+---------|
| Emacs | 27.1 |* Installation
** With use-package and straight.el
#+begin_src elisp :eval no
(use-package prettier-elisp
:straight (prettier-elisp
:type git
:host github
:repo "KarimAziev/prettier-elisp")
:hook ((emacs-lisp-mode . prettier-elisp-mode)))
#+end_src** Manual installation
Download the source code and put it in a location of your choice, e.g., into =~/.emacs.d/prettier-elisp/=:
#+begin_src shell :eval no
git clone https://github.com/KarimAziev/prettier-elisp.git ~/.emacs.d/prettier-elisp/
#+end_srcAdd the downloaded directory to the load path:
#+begin_src elisp :eval no
(add-to-list 'load-path "~/.emacs.d/prettier-elisp/")
(require 'prettier-elisp)
#+end_src* Usage
- =M-x prettier-elisp-mode= - Toggle automatic formatting of the current definition before saving the buffer.
- =M-x prettier-elisp-buffer-mode= - Toggle automatic formatting of the whole buffer before saving.
- =M-x prettier-elisp= - Manually format the current function definition.
- =M-x prettier-elisp-buffer= - Manually format the entire buffer.* Customization
#+begin_quote
[!NOTE]You may also want to adjust the value of the =fill-column= variable.
#+end_quote- ~prettier-elisp-buffer-post-format-hooks~ - Hooks to run after formatting the whole buffer.
- ~prettier-elisp-pre-format-hooks~ - Hooks to run before formatting.