File: simple_nvim.py

package info (click to toggle)
python-pynvim 0.5.2-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 432 kB
  • sloc: python: 3,040; makefile: 4
file content (13 lines) | stat: -rw-r--r-- 282 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
import neovim

import pynvim.api


@neovim.plugin
class SimplePlugin:
    def __init__(self, nvim: pynvim.api.Nvim):
        self.nvim = nvim

    @neovim.command("SimpleHelloWorld")
    def hello_world(self) -> None:
        self.nvim.command("echom 'SimplePlugin: Hello World!'")