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: Union[str, int] = 0, complete: Optional[str, None] = None, range: Union[str, int, None] = None, count: Optional[int, None] = None, bang: bool = False, register: bool = False, sync: bool = False, allow_nested: bool = False, eval: Optional[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: Optional[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: Union[bool, str, int] = False, sync: bool = False, allow_nested: bool = False, eval: Optional[str, None] = None) → Callable[[F], F][source]

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