handler

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package handler is a collection of all methods supported by LSP. To implements a new methods, just create a new file with the name of the method.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoWorkspaceFound = errors.New("no workspace found. Please open a folder instead of a single file")
	ErrMultiWorkspace   = errors.New("multiple workspace found. Please open a single workspace")
)

Functions

This section is empty.

Types

type Handler

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

Handler is the storage for any handler of the server.LSP. It also handles a single workspace for now which represent a VSCode project

func New

func New(opts ...Options) *Handler

New creates a Handler instance that contains all methods supported by the LSP

func (*Handler) Handler

func (h *Handler) Handler() *protocol.Handler

type Logger

type Logger struct {
	logging.Logger
	ServerMode ServerMode
}

type Options

type Options = func(*Handler)

func WithLogger

func WithLogger(log Logger) Options

WithLogger set logger in handler

func WithName

func WithName(name string) Options

WithName set language server name

func WithVersion

func WithVersion(version string) Options

WithVersion set language server version

type ServerMode

type ServerMode interface {
	IsProd() bool
}

Jump to

Keyboard shortcuts

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