handler

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2018 License: BSD-3-Clause Imports: 20 Imported by: 0

Documentation

Overview

Package handler implements a VSCode-compatible language server for Serulian.

Index

Constants

View Source
const DiagnoseDelay = 500 * time.Millisecond

DiagnoseDelay is the delay waited before a document is re-parsed.

View Source
const MaximumBuildDuration = 5 * time.Second

MaximumBuildDuration is the maximum duration to build a handle before we timeout.

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(entrypointSourceFile string, vcsDevelopmentDirectories []string) jsonrpc2.Handler

NewHandler creates a Serulian language server handler.

Types

type CancelationHandle added in v0.3.2

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

CancelationHandle is a handle for tracking the cancelation of a language server request.

func NewCancelationHandle added in v0.3.2

func NewCancelationHandle(id jsonrpc2.ID) *CancelationHandle

NewCancelationHandle returns a new cancelation handle.

func (*CancelationHandle) Cancel added in v0.3.2

func (ch *CancelationHandle) Cancel()

Cancel marks the operation as having been canceled.

func (*CancelationHandle) Error added in v0.3.2

func (ch *CancelationHandle) Error() error

func (*CancelationHandle) WasCanceled added in v0.3.2

func (ch *CancelationHandle) WasCanceled() bool

WasCanceled returns whether the operation was canceled.

type SerulianLangServerHandler

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

SerulianLangServerHandler defines a JSON-RPC handler that implements the Serulian language server.

func (*SerulianLangServerHandler) Handle

Handle implements the JSON-RPC handling method for all incoming requests and notifications.

Jump to

Keyboard shortcuts

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