diff --git a/sphinx_autodoc_typehints.py b/sphinx_autodoc_typehints.py
index e7f8f4a..3eafe5b 100644
--- a/sphinx_autodoc_typehints.py
+++ b/sphinx_autodoc_typehints.py
@@ -117,6 +117,10 @@ def format_annotation(annotation):
         return '{}`~{}.{}`{}'.format(prefix, module, class_name, extra)
     elif annotation is Ellipsis:
         return '...'
+    elif (inspect.isfunction(annotation) and annotation.__module__ == 'typing' and
+          hasattr(annotation, '__name__') and hasattr(annotation, '__supertype__')):
+        return ':py:func:`~typing.NewType`\\(:py:data:`~{}`, {})'.format(
+            annotation.__name__, format_annotation(annotation.__supertype__))
     elif inspect.isclass(annotation) or inspect.isclass(getattr(annotation, '__origin__', None)):
         if not inspect.isclass(annotation):
             annotation_cls = annotation.__origin__

diff --git a/tests/test_sphinx_autodoc_typehints.py b/tests/test_sphinx_autodoc_typehints.py
index cba630f..6c4df94 100644
--- a/tests/test_sphinx_autodoc_typehints.py
+++ b/tests/test_sphinx_autodoc_typehints.py
@@ -3,7 +3,8 @@ import pytest
 import sys
 import textwrap
 from typing import (
-    Any, AnyStr, Callable, Dict, Generic, Mapping, Optional, Pattern, Tuple, TypeVar, Union, Type)
+    Any, AnyStr, Callable, Dict, Generic, Mapping, NewType, Optional, Pattern,
+    Tuple, TypeVar, Union, Type)
 
 from typing_extensions import Protocol
 
@@ -12,6 +13,7 @@ from sphinx_autodoc_typehints import format_annotation, process_docstring
 T = TypeVar('T')
 U = TypeVar('U', covariant=True)
 V = TypeVar('V', contravariant=True)
+W = NewType('W', str)
 
 
 class A:
@@ -89,7 +91,8 @@ class Slotted:
     (C,                             ':py:class:`~%s.C`' % __name__),
     (D,                             ':py:class:`~%s.D`' % __name__),
     (E,                             ':py:class:`~%s.E`\\[\\~T]' % __name__),
-    (E[int],                        ':py:class:`~%s.E`\\[:py:class:`int`]' % __name__)
+    (E[int],                        ':py:class:`~%s.E`\\[:py:class:`int`]' % __name__),
+    (W,                             ':py:func:`~typing.NewType`\\(:py:data:`~W`, :py:class:`str`)')
 ])
 def test_format_annotation(annotation, expected_result):
     result = format_annotation(annotation)

Types created with NewType are rendered poorly.
If I have code like:
```
    Foo = typing.NewType('Foo', str)
    def bar(x: Foo):
        pass
```
then its parameter gets documented as:
```
    x (<function NewType.<locals>.new_type at 0x7f644b4c6488>)
```
I was expecting something like one of the following:
```
    x (Foo)
    x (Foo alias for str)
    x (str)
```
tests/test_sphinx_autodoc_typehints.py::test_format_annotation[W-:py:func:`~typing.NewType`\\(:py:data:`~W`,
tests/test_sphinx_autodoc_typehints.py::test_format_annotation[str-:py:class:`str`] tests/test_sphinx_autodoc_typehints.py::test_format_annotation[int-:py:class:`int`] tests/test_sphinx_autodoc_typehints.py::test_format_annotation[NoneType-``None``] tests/test_sphinx_autodoc_typehints.py::test_format_annotation[annotation3-:py:data:`~typing.Any`] tests/test_sphinx_autodoc_typehints.py::test_format_annotation[AnyStr-:py:data:`~typing.AnyStr`] tests/test_sphinx_autodoc_typehints.py::test_format_annotation[annotation5-:py:class:`~typing.Generic`\\[\\~T]] tests/test_sphinx_autodoc_typehints.py::test_format_annotation[annotation7-:py:class:`~typing.Mapping`\\[\\~T, tests/test_sphinx_autodoc_typehints.py::test_format_annotation[annotation8-:py:class:`~typing.Mapping`\\[:py:class:`str`, tests/test_sphinx_autodoc_typehints.py::test_format_annotation[annotation9-:py:class:`~typing.Mapping`\\[\\~T, tests/test_sphinx_autodoc_typehints.py::test_format_annotation[annotation10-:py:class:`~typing.Mapping`\\[:py:class:`str`, tests/test_sphinx_autodoc_typehints.py::test_format_annotation[annotation12-:py:class:`~typing.Dict`\\[\\~T, tests/test_sphinx_autodoc_typehints.py::test_format_annotation[annotation13-:py:class:`~typing.Dict`\\[:py:class:`str`, tests/test_sphinx_autodoc_typehints.py::test_format_annotation[annotation14-:py:class:`~typing.Dict`\\[\\~T, tests/test_sphinx_autodoc_typehints.py::test_format_annotation[annotation15-:py:class:`~typing.Dict`\\[:py:class:`str`, tests/test_sphinx_autodoc_typehints.py::test_format_annotation[annotation16-:py:class:`~typing.Tuple`] tests/test_sphinx_autodoc_typehints.py::test_format_annotation[annotation17-:py:class:`~typing.Tuple`\\[:py:class:`str`, tests/test_sphinx_autodoc_typehints.py::test_format_annotation[annotation18-:py:class:`~typing.Tuple`\\[:py:class:`int`, tests/test_sphinx_autodoc_typehints.py::test_format_annotation[annotation19-:py:class:`~typing.Tuple`\\[:py:class:`str`, tests/test_sphinx_autodoc_typehints.py::test_format_annotation[annotation20-:py:data:`~typing.Union`] tests/test_sphinx_autodoc_typehints.py::test_format_annotation[annotation21-:py:data:`~typing.Union`\\[:py:class:`str`, tests/test_sphinx_autodoc_typehints.py::test_format_annotation[annotation22-:py:data:`~typing.Union`\\[:py:class:`str`, tests/test_sphinx_autodoc_typehints.py::test_format_annotation[annotation23-:py:data:`~typing.Optional`\\[:py:class:`str`]] tests/test_sphinx_autodoc_typehints.py::test_format_annotation[annotation24-:py:data:`~typing.Callable`] tests/test_sphinx_autodoc_typehints.py::test_format_annotation[annotation25-:py:data:`~typing.Callable`\\[..., tests/test_sphinx_autodoc_typehints.py::test_format_annotation[annotation26-:py:data:`~typing.Callable`\\[\\[:py:class:`int`], tests/test_sphinx_autodoc_typehints.py::test_format_annotation[annotation27-:py:data:`~typing.Callable`\\[\\[:py:class:`int`, tests/test_sphinx_autodoc_typehints.py::test_format_annotation[annotation28-:py:data:`~typing.Callable`\\[\\[:py:class:`int`, tests/test_sphinx_autodoc_typehints.py::test_format_annotation[annotation29-:py:data:`~typing.Callable`\\[\\[\\~T], tests/test_sphinx_autodoc_typehints.py::test_format_annotation[annotation31-:py:class:`~typing.Pattern`\\[:py:class:`str`]] tests/test_sphinx_autodoc_typehints.py::test_format_annotation[A-:py:class:`~test_sphinx_autodoc_typehints.A`] tests/test_sphinx_autodoc_typehints.py::test_format_annotation[B-:py:class:`~test_sphinx_autodoc_typehints.B`\\[\\~T]] tests/test_sphinx_autodoc_typehints.py::test_format_annotation[annotation34-:py:class:`~test_sphinx_autodoc_typehints.B`\\[:py:class:`int`]] tests/test_sphinx_autodoc_typehints.py::test_format_annotation[C-:py:class:`~test_sphinx_autodoc_typehints.C`] tests/test_sphinx_autodoc_typehints.py::test_format_annotation[D-:py:class:`~test_sphinx_autodoc_typehints.D`] tests/test_sphinx_autodoc_typehints.py::test_format_annotation[E-:py:class:`~test_sphinx_autodoc_typehints.E`\\[\\~T]] tests/test_sphinx_autodoc_typehints.py::test_format_annotation[annotation38-:py:class:`~test_sphinx_autodoc_typehints.E`\\[:py:class:`int`]] tests/test_sphinx_autodoc_typehints.py::test_format_annotation_type[A-:py:class:`~typing.Type`\\[:py:class:`~test_sphinx_autodoc_typehints.A`]] tests/test_sphinx_autodoc_typehints.py::test_process_docstring_slot_wrapper