Plugin Decorators

Plugin decorators.

Plugin

pynvim.plugin.plugin(cls: T) T[source]

Tag a class as a plugin.

This decorator is required to make the class methods discoverable by the plugin_load method of the host.

Command

pynvim.plugin.command(name: str, nargs: str | int = 0, complete: str | None = None, range: str | int | None = None, count: int | None = None, bang: bool = False, register: bool = False, sync: bool = False, allow_nested: bool = False, eval: str | None = None) Callable[[F], F][source]

Tag a function or plugin method as a Nvim command handler.

Autocmd

pynvim.plugin.autocmd(name: str, pattern: str = '*', sync: bool = False, allow_nested: bool = False, eval: str | None = None) Callable[[F], F][source]

Tag a function or plugin method as a Nvim autocommand handler.

Function

pynvim.plugin.function(name: str, range: bool | str | int = False, sync: bool = False, allow_nested: bool = False, eval: str | None = None) Callable[[F], F][source]

Tag a function or plugin method as a Nvim function handler.