-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add prettier layer. Add prettier support for .css/.scss/.less/.js/.json file. Add layer variables for html, javascript, json.
- Loading branch information
Showing
21 changed files
with
213 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
;;; config.el --- html layer configuration file for Spacemacs | ||
;; | ||
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors | ||
;; | ||
;; Author: Seong Yong-ju <sei40kr@gmail.com> | ||
;; URL: https://github.com/syl20bnr/spacemacs | ||
;; | ||
;; This file is not part of GNU Emacs. | ||
;; | ||
;;; License: GPLv3 | ||
|
||
(defvar web-fmt-tool 'web-beautify | ||
"The formatter to format a CSS/SCSS/Less file. Possible values are `web-beautify' and `prettier'.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
;;; config.el --- json layer configuration file for Spacemacs | ||
;; | ||
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors | ||
;; | ||
;; Author: Seong Yong-ju <sei40kr@gmail.com> | ||
;; URL: https://github.com/syl20bnr/spacemacs | ||
;; | ||
;; This file is not part of GNU Emacs. | ||
;; | ||
;;; License: GPLv3 | ||
|
||
;; Variables | ||
|
||
(defvar json-fmt-tool 'web-beautify | ||
"The formatter to format a JSON file. Possible values are `web-beautify' and `prettier'.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#+TITLE: prettier layer | ||
|
||
* Table of Contents :TOC_4_gh:noexport: | ||
- [[#description][Description]] | ||
- [[#features][Features:]] | ||
- [[#install][Install]] | ||
- [[#key-bindings][Key Bindings]] | ||
|
||
* Description | ||
This layer adds support for [[https://github.com/prettier/prettier][prettier]] | ||
|
||
** Features: | ||
- Format buffer in a consistent style | ||
|
||
* Install | ||
To use this configuration layer, add it to your =~/.spacemacs=. | ||
|
||
To install =prettier= globally: | ||
|
||
#+BEGIN_SRC sh | ||
$ npm install -g prettier | ||
#+END_SRC | ||
|
||
* Key Bindings | ||
|
||
| Key Binding | Description | | ||
|-------------+-----------------------------------| | ||
| ~SPC m =~ | format buffer in supported layers | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
;;; config.el --- prettier Layer configuration file for Spacemacs | ||
;; | ||
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors | ||
;; | ||
;; Author: Seong Yong-ju <sei40kr@gmail.com> | ||
;; URL: https://github.com/syl20bnr/spacemacs | ||
;; | ||
;; This file is not part of GNU Emacs. | ||
;; | ||
;;; License: GPLv3 | ||
|
||
;; Variables | ||
|
||
(defvar spacemacs--prettier-modes nil | ||
"List of mode.") |
Oops, something went wrong.