Skip to content

WhiteMemory99/Intellij-Python-Inlay-Params

Repository files navigation

Python Inlay Params

Build Version Rating Downloads License: MIT

Quick Installation

  • Using IDE built-in plugin system:

    Settings/Preferences > Plugins > Marketplace >
    Search for "Python Inlay Params" > Install Plugin

  • Manually:

    Download the latest release and install it manually using Settings/Preferences > Plugins > ⚙️ > Install plugin from disk...

Description

This plugin (quite decently) implements inlay parameter hints for Python.
In addition, you can enable type annotation hints for variables and function return types.

Supported expressions

Pretty much any expression is supported:

  • dataclass and class instantiation
  • lambdas
  • decorators
  • function and method calls
  • etc.

Scroll to the demo at the bottom to see how it works.

Settings

Parameter hints

To enable/disable them entirely, follow this path:

Settings -> Editor -> Inlay Hints -> Parameter names -> Python

But you can also switch specific parts in that menu: Class hints, Function hints to enable/disable them individually. Additionally, there's an option to avoid redundant hints more aggressively, called Hide overlaps, which is used to hide a hint if a parameter name is completely overlapped by its argument.

Type annotation hints (BETA)

Partially disabled by default.
To enable/disable them entirely, follow this path:

Settings -> Editor -> Inlay Hints -> Types -> Python

There are two main options under this partition: Type annotations and Function return types.
Look at the demo screenshot below to see them in work (last section).

Demo Screenshot