nvimwrapper

package
v0.0.0-...-c501a93 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2024 License: GPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Rows = 40
	Cols = 120
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Line

type Line struct {
	Text   string
	Number int
}

type NvimResult

type NvimResult struct {
	Hl             map[int]hl.HlAttr
	Mode           string
	Lines          []RenderedLine
	CursorPosition [2]int
}

func (NvimResult) Col

func (r NvimResult) Col() int

func (NvimResult) Row

func (r NvimResult) Row() int

type NvimWrapper

type NvimWrapper struct {
	// contains filtered or unexported fields
}

func Spawn

func Spawn(config *config.NvimConfig) (*NvimWrapper, error)

func (*NvimWrapper) Close

func (w *NvimWrapper) Close()

func (*NvimWrapper) Input

func (w *NvimWrapper) Input(input string) error

func (*NvimWrapper) OpenFile

func (w *NvimWrapper) OpenFile(file string) error

func (*NvimWrapper) Paste

func (w *NvimWrapper) Paste(input string) error

func (*NvimWrapper) Render

func (n *NvimWrapper) Render() (NvimResult, error)

func (*NvimWrapper) RenderOnFlush

func (n *NvimWrapper) RenderOnFlush(ctx context.Context, handler func(result NvimResult) error) error

func (*NvimWrapper) SendKey

func (w *NvimWrapper) SendKey(keyPress key.KeyPress)

type RenderedLine

type RenderedLine struct {
	Spans []Span
}

type Span

type Span struct {
	Text string
	HlId int
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL