Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/praveenperera/spacemacs-prettier
Adds prettier-js formatter to spacemacs locally. Temporary solution until prettier-js is launched on MELPA
https://github.com/praveenperera/spacemacs-prettier
emacs javascript prettier prettier-js spacemacs
Last synced: about 1 month ago
JSON representation
Adds prettier-js formatter to spacemacs locally. Temporary solution until prettier-js is launched on MELPA
- Host: GitHub
- URL: https://github.com/praveenperera/spacemacs-prettier
- Owner: praveenperera
- Created: 2017-03-14T23:47:30.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-08-02T13:37:43.000Z (over 7 years ago)
- Last Synced: 2024-09-29T11:45:25.963Z (about 2 months ago)
- Topics: emacs, javascript, prettier, prettier-js, spacemacs
- Language: Emacs Lisp
- Homepage:
- Size: 13.7 KB
- Stars: 16
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
README
## Deprecated
This package is no longer needed as prettier-js was added to [MELPA](https://github.com/melpa/melpa/pull/4777)* To install the MELPA package add prettier-js to `dotspacemacs-additional-packages` in your spacemacs file.
---------------
---------------
### Instructions
1. Clone this project into `~/.emacs.d/private/`
2. Add `~/.emacs.d/private/` to `dotspacemacs-configuration-layer-path`
3. Add `spacemacs-prettier` to `dotspacemacs-configuration-layers`
4. Install prettier-js `yarn global add prettier` or `npm i -g prettier`### Enable on-save
If you want prettier to run on save you need to add the hooks to your favourite javascript mode(s) into your `.spacemacs` file```elisp
(add-hook 'js2-mode-hook 'prettier-js-mode)
(add-hook 'web-mode-hook 'prettier-js-mode)
...
```### Optional Args
You can set prettier arguments in your .spacemacs file:```elisp
;; prettier settings
(setq prettier-js-args '(
"--trailing-comma" "all"
"--bracket-spacing" "false"
))
```