Commit graph

3 commits

Author SHA1 Message Date
Maximilian Wolff 903ad8a8e1
[sql] Revise sql-layer
Add installation instruction for `sqlfmt` executable
Adapt documentation to be more like the other layers
Replace wrong default sqlfmt parameter -u with --use-spaces
Make error buffers be reused by default to reduce memory consumption
Change prefix for repl keybindings to be conform with the other layers
Remove obsolete progn statement
2020-02-20 21:36:42 +01:00
Cate B c001159718
[sql] Add sqlfmt-region command, bindings; enhance customize options
Enhances `sqlfmt` support in SQL layer.

`sqlfmt` was only being applied against the whole buffer, and did not allow
invocation against a specific region in the buffer. `sqlfmt` customize options
were not included under the `sql` group. It was not possible to control if
`sqlfmt` reused an existing error buffer or generated new ones.

- Added `sqlfmt-region` interactive command and binding under `sql-mode` keymap
  - `sqlfmt-buffer` calls into `sqlfmt-region` with `(point-min)` and
    `(point-max`)

- Added `sqlfmt` customize group as child to `sql` customize group

- Added `sqlfmt-reuse-error-buffer` option

- Updated `sql` layer documentation to reflect changes
2020-02-20 21:10:34 +01:00
Seong Yong-ju 09835e1ed2 [sql] Add a code formatter for sql-mode
Add sql layer options for sqlfmt. Add a function spacemacs/sql-format-buffer to
format the whole buffer with sqlfmt. Add a key binding for format.
2019-04-06 16:20:23 +02:00