Closed db7 closed 8 months ago
Definitely "yes" for the upcoming fmt2
(though I have not been actively working on it), and "kinda yes" for the current fmt
.
In the current version of fmt
, you can create .fmt.rkt
in the project root with the following content:
#lang racket/base
(provide the-formatter-map)
(require fmt/params)
(current-adjust-paren-shape #f)
(define (the-formatter-map s)
#f)
Then, when you call raco fmt <path/to/file.rkt>
from the project root, paren shapes won't be converted.
(The above method works, but it is very ad-hoc. The goal of fmt2
is to make this kind of configuration adjustment less ad-hoc.)
Is it possible to tell
fmt
to format (indentation, line breaks, etc) but not modify the code? In particular, I’d likefmt
to stop changing( )
into[ ]
(in some of my source codes).