| name | parinfer |
| description | Check and correct parenthesis balance from indentation. |
Check if installed
cd /workspace/acl2-jupyter && make test-parinfer
Install
cd /workspace/acl2-jupyter && make install-parinfer
Correct parens from indentation.
. $HOME/.cargo/env && parinfer-rust -m indent -l lisp --lisp-block-comments <file.lisp | diff file.lisp -
When applying corrections don't count parens, just get your indentation correct and parinfer will give correct parens.
Correct indentations from parens. For if you have correct code but need to fix indentation so you can make changes followed by parinfer to correct parens from indentation.
. $HOME/.cargo/env && parinfer-rust -m paren -l lisp --lisp-block-comments <file.lisp | diff file.lisp -
Help
parinfer-rust --help
Usage: parinfer-rust [options]
Options:
--comment-char CC
(default: ';')
--string-delimiters DELIM
(default: '"')
-h, --help show this help message
--input-format FMT
'json', 'text' (default: 'text')
--guile-block-comments
recognize
--no-guile-block-comments
do not recognize
--hy-bracket-strings
recognize
--no-hy-bracket-strings
do not recognize
]hy-style]```
--janet-long-strings
recognize ``` janet-style long strings ```
--no-janet-long-strings
do not recognize ``` janet-style long strings ```
-l, --language LANG 'clojure', 'guile', 'hy', 'janet', 'lisp', 'racket',
'scheme' (default: 'clojure')
--lisp-block-comments
recognize
--no-lisp-block-comments
do not recognize
--lisp-vline-symbols
recognize |lisp-style vline symbol|s.
--no-lisp-vline-symbols
do not recognize |lisp-style vline symbol|s.
-m, --mode MODE parinfer mode (indent, paren, or smart) (default:
smart)
--output-format FMT
'json', 'kakoune', 'text' (default: 'text')
--scheme-sexp-comments
recognize
--no-scheme-sexp-comments
do not recognize