server

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2019 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Overview

Package server implements a new Nvim server with low-level nvim rpc-connecting.

Index

Constants

This section is empty.

Variables

View Source
var DefaultDialer = func(ctx context.Context, network, address string) (net.Conn, error) {
	return (&net.Dialer{
		Timeout:   30 * time.Second,
		KeepAlive: 30 * time.Second,
		DualStack: true,
	}).DialContext(ctx, network, address)
}
View Source
var DefaultLogFunc = func(ctx context.Context) func(string, ...interface{}) {
	return func(format string, a ...interface{}) {
		logger.FromContext(ctx).Info(fmt.Sprintf(format, a))
	}
}

Functions

func Dial

func Dial(ctx context.Context) (n *nvim.Nvim, err error)

Types

type Server

type Server struct {
	Nvim *nvim.Nvim
}

func NewServer

func NewServer(ctx context.Context) (*Server, error)

func (*Server) Close

func (s *Server) Close() error

func (*Server) Serve

func (s *Server) Serve() error

Jump to

Keyboard shortcuts

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