Skip to content

Yet another wrapper for github.com/neovim/go-client.

License

Notifications You must be signed in to change notification settings

minodisk/go-nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nvim GoDoc

Yet another wrapper for github.com/neovim/go-client.

Installation

go get github.com/minodisk/go-nvim

Usage

import (
	"github.com/minodisk/go-nvim/buffer"
	"github.com/minodisk/go-nvim/nvim"
	"github.com/minodisk/go-nvim/window"
	cnvim "github.com/neovim/go-client/nvim"
	cplugin "github.com/neovim/go-client/nvim/plugin"
)

func main() {
	cplugin.Main(func (p *cplugin.Plugin) error {
		p.HandleCommand(&cplugin.CommandOptions{
			Name:  "Example",
		}, func (v *cnvim.Nvim) error {
			vim := nvim.New(v)
			win, _ := vim.CurrentWindow()
			buf, _ := win.Buffer()
			buf.Write([][]byte{
				[]byte("foo"),
				[]byte("bar"),
				[]byte("baz"),
			})
		})
		return nil
	}
}

About

Yet another wrapper for github.com/neovim/go-client.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages