# Indentation configuration for DrRacket and fmt

**URL:** <https://racket.discourse.group/t/indentation-configuration-for-drracket-and-fmt/486>\
**Category:** Questions & Answers\
**Tags:** drracket, fmt\
**Created:** [December 29, 2021, 1:15am UTC](https://racket.discourse.group/t/indentation-configuration-for-drracket-and-fmt/486 "2021-12-29T01:15:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sorawee](https://avatars.discourse-cdn.com/v4/letter/s/ea5d25/32.png) [@sorawee](https://racket.discourse.group/u/sorawee)\
**Post date:** [December 29, 2021, 1:15am UTC](https://racket.discourse.group/t/indentation-configuration-for-drracket-and-fmt/486/1 "2021-12-29T01:15:49Z")

</div>

@notjack and @SamPhillips seem to prefer `pattern` from the `syntax/parse` library to be indented as follows:

```scheme
(define-syntax-class arglist
  (pattern x:id
    #:with name #'x))

```

as opposed to:

```scheme
(define-syntax-class arglist
  (pattern x:id
           #:with name #'x))

```

[`fmt`](https://docs.racket-lang.org/fmt/) can deal with this easily, provided that most people prefer it. So please reply to this thread if you have any opinion. (cc: @ryanc)

Another change that should be made is to add `pattern` as a "Define-like Keywords" in DrRacket. This is so that `fmt` and DrRacket will not fight each other. Any objection?

On the topic of DrRacket indentation configuration, is it worth cleaning up the current configuration? I see stuff like `class-asi`, `class100`, which are not documented anywhere. Also, a lot of entries in "Define-like Keywords" already match the regexp, so there's no need to list them explicitly (e.g., `define-predicate`). Is it OK to remove these entries? (cc: @robby)

-- Sorawee (Oak)

---

<div class="post-metadata">

**Author:** ![robby](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/robby/32/7_2.png) [@robby](https://racket.discourse.group/u/robby)\
**Post date:** [December 29, 2021, 3:14pm UTC](https://racket.discourse.group/t/indentation-configuration-for-drracket-and-fmt/486/2 "2021-12-29T15:14:42Z")

</div>

I think it would be great to clean that up!

My instinct would be that `fmt` should look at the same preferences that DrRacket looks at (and modifies). This would mean a module-level dependency on framework/preferences (not a big deal) and a pkg-level dependency on gui-lib (possibly a big deal but I don't mind moving things).

Longer term, of course, it would be great if there wasn't a direct dependency between fmt (or DrRacket's indentation code) and these settings, but it was all gotten via something like `read-language`.

---

<div class="post-metadata">

**Author:** ![sorawee](https://avatars.discourse-cdn.com/v4/letter/s/ea5d25/32.png) [@sorawee](https://racket.discourse.group/u/sorawee)\
**Post date:** [January 20, 2022, 10:01pm UTC](https://racket.discourse.group/t/indentation-configuration-for-drracket-and-fmt/486/3 "2022-01-20T22:01:02Z")

</div>

Since no one objects, I will submit a PR to add `pattern` as a “Define-like Keywords” to `syntax-color` as I outlined above.
