Fynevim is both a Fyne widget that can be included in other Fyne apps as well as a standalone GUI for Neovim.
Warning: fynevim is still under development, there may be breaking changes until v1 is released.
- The command
:Pre[view]allows for rendered previews of markdown files. Press<Esc>to exit preview mode.
- Install neovim.
- Install go.
- Run
make install.
Here's a minimal example of embedding a fyenvim text editor in a fyne app:
package main
import (
"fyne.io/fyne/v2/app"
fynevim "github.com/gjkliewer/fynevim/widget"
"github.com/neovim/go-client/nvim"
)
func main() {
a := app.New()
window := a.NewWindow("Neovim")
editor := fynevim.NewEditor(
nil,
[]nvim.ChildProcessOption{
nvim.ChildProcessCommand("nvim"), // nvim must be in PATH
nvim.ChildProcessArgs(
"--embed",
),
},
)
defer editor.Nvim.Close()
window.SetContent(editor)
window.ShowAndRun()
}- image preview
- vertical splits have scrolling issues
- fynevim fails to start if passed file has a swap file