handlers

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2020 License: MPL-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CancelRequest

func CancelRequest(ctx context.Context, params lsp.CancelParams) error

func Initialized

func Initialized(ctx context.Context, params lsp.None) error

func LogHandler

func LogHandler(logger *log.Logger) *logHandler

func NewSession added in v0.2.0

func NewSession(srvCtx context.Context) session.Session

func Shutdown

func Shutdown(ctx context.Context, vs lsp.None) error

func TextDocumentDidChange

func TextDocumentDidChange(ctx context.Context, params DidChangeTextDocumentParams) error

func TextDocumentDidClose

func TextDocumentDidClose(ctx context.Context, params lsp.DidCloseTextDocumentParams) error

Types

type DidChangeTextDocumentParams added in v0.3.0

type DidChangeTextDocumentParams struct {
	TextDocument   VersionedTextDocumentIdentifier      `json:"textDocument"`
	ContentChanges []lsp.TextDocumentContentChangeEvent `json:"contentChanges"`
}

TODO: Revisit after https://github.com/hashicorp/terraform-ls/issues/118 is addressed Then we could switch back to upstream go-lsp

func (*DidChangeTextDocumentParams) UnmarshalJSON added in v0.3.0

func (v *DidChangeTextDocumentParams) UnmarshalJSON(b []byte) error

UnmarshalJSON implements non-strict json.Unmarshaler.

type VersionedTextDocumentIdentifier added in v0.3.0

type VersionedTextDocumentIdentifier struct {
	URI lsp.DocumentURI `json:"uri"`
	/**
	 * The version number of this document.
	 */
	Version int `json:"version"`
}

func (*VersionedTextDocumentIdentifier) UnmarshalJSON added in v0.3.0

func (v *VersionedTextDocumentIdentifier) UnmarshalJSON(b []byte) error

UnmarshalJSON implements non-strict json.Unmarshaler.

Jump to

Keyboard shortcuts

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