mirror of
https://github.com/vale981/apheleia
synced 2025-03-04 17:11:40 -05:00
Add bean-format (#101)
* feat: add bean-format * fix: apt => apt-get Co-authored-by: Radon Rosborough <radon.neon@gmail.com> * fix: pip => pip3 Co-authored-by: Radon Rosborough <radon.neon@gmail.com> * Update changelog Co-authored-by: Radon Rosborough <radon.neon@gmail.com>
This commit is contained in:
parent
2fa9dd97ed
commit
ac6f733d7b
5 changed files with 31 additions and 2 deletions
|
@ -8,9 +8,12 @@ The format is based on [Keep a Changelog].
|
|||
* shfmt uses 4 spaces instead of tabs by default.
|
||||
|
||||
### Formatters
|
||||
* [bean-format](https://github.com/beancount/beancount) for Beancount
|
||||
([#101]).
|
||||
* [stylua](https://github.com/JohnnyMorganz/StyLua) for Lua ([#105]).
|
||||
|
||||
[#105]: https://github.com/raxod502/apheleia/pull/105
|
||||
[#101]: https://github.com/radian-software/apheleia/pull/101
|
||||
[#105]: https://github.com/radian-software/apheleia/pull/105
|
||||
|
||||
## 3.0 (released 2022-06-01)
|
||||
### Breaking changes
|
||||
|
|
|
@ -919,7 +919,8 @@ being run, for diagnostic purposes."
|
|||
(apply-partially #'kill-buffer scratch)))))
|
||||
|
||||
(defcustom apheleia-formatters
|
||||
'((black . ("black" "-"))
|
||||
'((bean-format . ("bean-format" filepath))
|
||||
(black . ("black" "-"))
|
||||
(brittany . ("brittany"))
|
||||
(clang-format . ("clang-format"))
|
||||
(dart-format . ("dart" "format"))
|
||||
|
@ -1047,6 +1048,7 @@ function: %s" command)))
|
|||
(defcustom apheleia-mode-alist
|
||||
'(;; php-mode has to come before cc-mode
|
||||
(php-mode . phpcs)
|
||||
(beancount-mode . bean-format)
|
||||
(cc-mode . clang-format)
|
||||
(c-mode . clang-format)
|
||||
(c++-mode . clang-format)
|
||||
|
|
2
test/formatters/installers/bean-format.bash
Normal file
2
test/formatters/installers/bean-format.bash
Normal file
|
@ -0,0 +1,2 @@
|
|||
apt-get install -y python3-pip
|
||||
pip3 install beancount
|
11
test/formatters/samplecode/bean-format/in.beancount
Normal file
11
test/formatters/samplecode/bean-format/in.beancount
Normal file
|
@ -0,0 +1,11 @@
|
|||
* Section header
|
||||
;; Accounts (comments)
|
||||
2013-01-01 open Expenses:Restaurant
|
||||
2013-01-01 open Assets:Cash
|
||||
2014-03-02 * "Something"
|
||||
Expenses:Restaurant 50.02 USD
|
||||
Assets:Cash
|
||||
2014-03-05 balance Assets:Cash -50.02 USD
|
||||
2014-03-10 * "Something"
|
||||
Assets:Other 10 HOOL {500.23} USD ; Bla
|
||||
Assets:Cash
|
11
test/formatters/samplecode/bean-format/out.beancount
Normal file
11
test/formatters/samplecode/bean-format/out.beancount
Normal file
|
@ -0,0 +1,11 @@
|
|||
* Section header
|
||||
;; Accounts (comments)
|
||||
2013-01-01 open Expenses:Restaurant
|
||||
2013-01-01 open Assets:Cash
|
||||
2014-03-02 * "Something"
|
||||
Expenses:Restaurant 50.02 USD
|
||||
Assets:Cash
|
||||
2014-03-05 balance Assets:Cash -50.02 USD
|
||||
2014-03-10 * "Something"
|
||||
Assets:Other 10 HOOL {500.23} USD ; Bla
|
||||
Assets:Cash
|
Loading…
Add table
Reference in a new issue