Skip to content

gjkliewer/fynevim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fynevim

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.

Features

  • The command :Pre[view] allows for rendered previews of markdown files. Press <Esc> to exit preview mode.

Standalone editor installation

  1. Install neovim.
  2. Install go.
  3. Run make install.

Library usage

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()
}

TODO

Features

  • image preview

Bugs

  • vertical splits have scrolling issues
  • fynevim fails to start if passed file has a swap file

About

Neovim GUI and embeddable Fyne neovim editor widget

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors