   end
 
   @docs [
-    :doc_string,
+    :doc_break,
+    :doc_collapse,
+    :doc_color,
     :doc_cons,
+    :doc_fits,
+    :doc_force,
+    :doc_group,
     :doc_nest,
-    :doc_break,
-    :doc_group,
-    :doc_color,
-    :doc_force,
-    :doc_fits,
-    :doc_collapse
+    :doc_string
   ]
 
   defguard is_doc(doc)

      When the default `:infer`, the list will be printed as a charlist if it
      is printable, otherwise as list. See `List.ascii_printable?/1` to learn
      when a charlist is printable.

    * `:limit` - limits the number of items that are inspected for tuples,
      bitstrings, maps, lists and any other collection of items. It does not

      If you don't want to limit the number of items to a particular number,
      use `:infinity`.

    * `:pretty` - if set to `true` enables pretty printing, defaults to `false`.

    * `:printable_limit` - limits the number of characters that are inspected
      on printable strings and printable charlists. You can use `String.printable?/1`
      and `List.ascii_printable?/1` to check if a given string or charlist is
      printable. Defaults to 4096. If you don't want to limit the number of
      characters to a particular number, use `:infinity`.

    * `:safe` - when `false`, failures while inspecting structs will be raised
      as errors instead of being wrapped in the `Inspect.Error` exception. This
      is useful when debugging failures and crashes for custom inspect
      implementations.

    * `:structs` - when `false`, structs are not formatted by the inspect
      protocol, they are instead printed as maps, defaults to `true`.

    * `:syntax_colors` - when set to a keyword list of colors the output is
      colorized. The keys are types and the values are the colors to use for
      each type (for example, `[number: :red, atom: :blue]`). Types can include
      `:atom`, `:list`, `:map`, `:number`, `:regex`, `:reset`, and `:tuple`.
      Colors can be any `t:IO.ANSI.ansidata/0` as accepted by `IO.ANSI.format/1`.

    * `:width` - defaults to 80 characters, used when pretty is `true` or when
      printing to IO devices. Set to 0 to force each item to be printed on its
      own line. If you don't want to limit the number of items to a particular
      number, use `:infinity`.

  """

  # TODO: Remove :char_lists key on v2.0
  defstruct base: :decimal,
            binaries: :infer,
            char_lists: :infer,
            charlists: :infer,
            custom_options: [],
            inspect_fun: &Inspect.inspect/2,
            limit: 50,
            pretty: false,
            printable_limit: 4096,
            safe: true,
            structs: true,
            syntax_colors: [],
            width: 80

  @type color_key :: atom

  # TODO: Remove :char_lists key and :as_char_lists value on v2.0
  @type t :: %__MODULE__{
          base: :decimal | :binary | :hex | :octal,
          binaries: :infer | :as_binaries | :as_strings,
          char_lists: :infer | :as_lists | :as_char_lists,
          charlists: :infer | :as_lists | :as_charlists,
          custom_options: keyword,
          inspect_fun: (any, t -> Inspect.Algebra.t()),
          limit: pos_integer | :infinity,
          pretty: boolean,
          printable_limit: pos_integer | :infinity,
          safe: boolean,
          structs: boolean,
          syntax_colors: [{color_key, IO.ANSI.ansidata()}],
          width: pos_integer | :infinity
        }
end

