> For the complete documentation index, see [llms.txt](https://tchat.tect.host/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tchat.tect.host/grammar/configuration.md).

# Configuration

## General

```yml
modules:
  # Automatically formats chat messages by fixing spacing, capitalization, and punctuation
  #
  # Grammar module loaded from modules/grammar.yml
  grammar: true
```

* modules.grammar: Enable/disable the full module

***

## Module

#### Trim Spaces

```yaml
# Collapses multiple consecutive spaces into a single one and trims
# leading/trailing whitespace from the message.
trim-spaces:
  enabled: true
```

Collapses multiple consecutive spaces into a single space and removes leading/trailing whitespace.

#### Capitalization

```yaml
# Capitalizes the first letters of the message.
# Example: "hello" -> "Hello" (with letters: 1)
cap:
  enabled: true
  # Number of letters to convert to uppercase, starting from the beginning.
  letters: 1
  # Minimum message length required to trigger this function.
  min-characters: 0
```

Capitalizes the first letters of the message.

#### Sentence Case

```yaml
# Capitalizes the first letter after a sentence-ending punctuation mark
# (., ! or ?) followed by a space.
sentence-case:
  enabled: true
  # Minimum message length required to trigger this function.
  min-characters: 0
```

Capitalizes the first letter after a sentence-ending punctuation mark (`.`, `!` or `?`) followed by a space.

#### Final Dot

```yaml
# Appends a final character to the message if it doesn't already end
# with one of the ignored endings below.
final-dot:
  enabled: true
  # You can customize this, you can use any other character, but
  # I recommend leaving it as a single dot.
  character: "."
  # Minimum message length required to trigger this function.
  min-characters: 0
  # Endings that prevent the final character from being appended
  # (only the last character of the message is checked).
  ignore-endings:
    - "."
    - "!"
    - "?"
    - ","
    - ";"
    - ":"
    - ")"
    - "]"
    - "}"
    - "\""
    - "'"
```

Appends a character to the end of the message if it does not already end with one of the ignored endings.
