Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/minodisk/go-nvim
Yet another wrapper for github.com/neovim/go-client.
https://github.com/minodisk/go-nvim
go go-client neovim nvim
Last synced: about 1 month ago
JSON representation
Yet another wrapper for github.com/neovim/go-client.
- Host: GitHub
- URL: https://github.com/minodisk/go-nvim
- Owner: minodisk
- License: mit
- Created: 2017-01-17T11:46:58.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-01T05:59:56.000Z (almost 8 years ago)
- Last Synced: 2024-09-28T06:21:02.691Z (about 2 months ago)
- Topics: go, go-client, neovim, nvim
- Language: Go
- Homepage:
- Size: 10.7 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nvim [![GoDoc](https://godoc.org/github.com/minodisk/go-nvim?status.png)](https://godoc.org/github.com/minodisk/go-nvim)
Yet another wrapper for github.com/neovim/go-client.
## Installation
```
go get github.com/minodisk/go-nvim
```## Usage
```go
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
}
}
```