mirror of
https://github.com/vale981/apheleia
synced 2025-03-04 09:01:42 -05:00
Add support for SQL using pgformatter
(#247)
Add support for [`pgFormatter`](https://github.com/darold/pgFormatter) for `sql-mode`. <!-- To expedite the pull request process, please see the contributor guide for my projects: <https://github.com/raxod502/contributor-guide> -->
This commit is contained in:
parent
fb8842b731
commit
515ee18092
5 changed files with 17 additions and 0 deletions
|
@ -84,6 +84,7 @@ The format is based on [Keep a Changelog].
|
|||
* [`ormolu`](https://github.com/tweag/ormolu) for haskell.
|
||||
* [`perltidy`](https://perltidy.sourceforge.net/) for
|
||||
[perl](https://www.perl.org/) ([#175]).
|
||||
* [`pgformatter`](https://github.com/darold/pgFormatter) for [SQL](https://en.wikipedia.org/wiki/SQL) ([#247])
|
||||
* [purs-tidy](https://github.com/natefaubion/purescript-tidy) for PureScript ([#182]).
|
||||
* [`rubocop`](https://github.com/rubocop/rubocop) for [ruby](https://www.ruby-lang.org/en/) ([#176]).
|
||||
* [`ruby-standard`](https://github.com/standardrb/standard) for
|
||||
|
@ -122,6 +123,7 @@ The format is based on [Keep a Changelog].
|
|||
[#236]: https://github.com/radian-software/apheleia/pull/236
|
||||
[#242]: https://github.com/radian-software/apheleia/pull/242
|
||||
[#253]: https://github.com/radian-software/apheleia/pull/253
|
||||
[#247]: https://github.com/radian-software/apheleia/pull/247
|
||||
|
||||
## 3.2 (released 2023-02-25)
|
||||
### Features
|
||||
|
|
|
@ -81,6 +81,9 @@
|
|||
"--enable-outside-detected-project"))
|
||||
(ormolu . ("ormolu"))
|
||||
(perltidy . ("perltidy" "--quiet" "--standard-error-output"))
|
||||
(pgformatter . ("pg_format"
|
||||
(apheleia-formatters-indent "--tabs" "--spaces" 'tab-width)
|
||||
(apheleia-formatters-fill-column "--wrap-limit")))
|
||||
(phpcs . ("apheleia-phpcs"))
|
||||
(prettier
|
||||
. ("apheleia-npx" "prettier" "--stdin-filepath" filepath
|
||||
|
@ -306,6 +309,7 @@ rather than using this system."
|
|||
(rust-mode . rustfmt)
|
||||
(rust-ts-mode . rustfmt)
|
||||
(scss-mode . prettier-scss)
|
||||
(sql-mode . pgformatter)
|
||||
(svelte-mode . prettier-svelte)
|
||||
(terraform-mode . terraform)
|
||||
(TeX-latex-mode . latexindent)
|
||||
|
|
1
test/formatters/installers/pgformatter.bash
Normal file
1
test/formatters/installers/pgformatter.bash
Normal file
|
@ -0,0 +1 @@
|
|||
apt-get install -y pgformatter
|
1
test/formatters/samplecode/pgformatter/in.sql
Normal file
1
test/formatters/samplecode/pgformatter/in.sql
Normal file
|
@ -0,0 +1 @@
|
|||
create table person (primary key id int, firstname varchar(500), lastname varchar(500), email varchar(500), password_sha256 varchar(200), password_seed varchar(200));
|
9
test/formatters/samplecode/pgformatter/out.sql
Normal file
9
test/formatters/samplecode/pgformatter/out.sql
Normal file
|
@ -0,0 +1,9 @@
|
|||
CREATE TABLE person (
|
||||
PRIMARY KEY id int,
|
||||
firstname varchar(500),
|
||||
lastname varchar(500),
|
||||
email varchar(500),
|
||||
password_sha256 varchar(200),
|
||||
password_seed varchar(200)
|
||||
);
|
||||
|
Loading…
Add table
Reference in a new issue