lsp

package
v0.0.22 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2019 License: BSD-3-Clause, BSD-3-Clause Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromProtocolEdits added in v0.0.4

func FromProtocolEdits(m *protocol.ColumnMapper, edits []protocol.TextEdit) ([]source.TextEdit, error)

func RunServerOnAddress

func RunServerOnAddress(ctx context.Context, cache source.Cache, addr string, h func(ctx context.Context, s *Server)) error

RunServerOnPort starts an LSP server on the given port and does not exit. This function exists for debugging purposes.

func RunServerOnPort

func RunServerOnPort(ctx context.Context, cache source.Cache, port int, h func(ctx context.Context, s *Server)) error

RunServerOnPort starts an LSP server on the given port and does not exit. This function exists for debugging purposes.

func ToProtocolEdits added in v0.0.4

func ToProtocolEdits(m *protocol.ColumnMapper, edits []source.TextEdit) ([]protocol.TextEdit, error)

Types

type Server

type Server struct {
	Conn *jsonrpc2.Conn
	// contains filtered or unexported fields
}

func NewClientServer

func NewClientServer(ctx context.Context, cache source.Cache, client protocol.Client) (context.Context, *Server)

NewClientServer

func NewServer

func NewServer(ctx context.Context, cache source.Cache, stream jsonrpc2.Stream) (context.Context, *Server)

NewServer starts an LSP server on the supplied stream, and waits until the stream is closed.

func (*Server) CodeAction

func (s *Server) CodeAction(ctx context.Context, params *protocol.CodeActionParams) ([]protocol.CodeAction, error)

func (*Server) CodeLens

func (*Server) Completion

func (s *Server) Completion(ctx context.Context, params *protocol.CompletionParams) (*protocol.CompletionList, error)

func (*Server) Declaration added in v0.0.13

func (*Server) Definition

func (*Server) Diagnostics added in v0.0.14

func (s *Server) Diagnostics(ctx context.Context, view source.View, uri span.URI)

func (*Server) DidChange

func (s *Server) DidChange(ctx context.Context, params *protocol.DidChangeTextDocumentParams) error

func (*Server) DidChangeConfiguration

func (s *Server) DidChangeConfiguration(context.Context, *protocol.DidChangeConfigurationParams) error

func (*Server) DidChangeWatchedFiles

func (s *Server) DidChangeWatchedFiles(context.Context, *protocol.DidChangeWatchedFilesParams) error

func (*Server) DidChangeWorkspaceFolders

func (s *Server) DidChangeWorkspaceFolders(ctx context.Context, params *protocol.DidChangeWorkspaceFoldersParams) error

func (*Server) DidClose

func (s *Server) DidClose(ctx context.Context, params *protocol.DidCloseTextDocumentParams) error

func (*Server) DidOpen

func (s *Server) DidOpen(ctx context.Context, params *protocol.DidOpenTextDocumentParams) error

func (*Server) DidSave

func (s *Server) DidSave(ctx context.Context, params *protocol.DidSaveTextDocumentParams) error

func (*Server) DocumentHighlight

func (s *Server) DocumentHighlight(ctx context.Context, params *protocol.TextDocumentPositionParams) ([]protocol.DocumentHighlight, error)
func (s *Server) DocumentLink(ctx context.Context, params *protocol.DocumentLinkParams) ([]protocol.DocumentLink, error)

func (*Server) DocumentSymbol

func (s *Server) DocumentSymbol(ctx context.Context, params *protocol.DocumentSymbolParams) ([]protocol.DocumentSymbol, error)

func (*Server) ExecuteCommand

func (s *Server) ExecuteCommand(context.Context, *protocol.ExecuteCommandParams) (interface{}, error)

func (*Server) Exit

func (s *Server) Exit(ctx context.Context) error

func (*Server) FoldingRange added in v0.0.9

func (*Server) Formatting

func (s *Server) Formatting(ctx context.Context, params *protocol.DocumentFormattingParams) ([]protocol.TextEdit, error)

func (*Server) Hover

func (*Server) Initialize

func (*Server) Initialized

func (s *Server) Initialized(ctx context.Context, params *protocol.InitializedParams) error

func (*Server) LogTraceNotification added in v0.0.13

func (s *Server) LogTraceNotification(context.Context, *protocol.LogTraceParams) error

func (*Server) PrepareRename added in v0.0.13

func (*Server) RangeFormatting

func (s *Server) RangeFormatting(ctx context.Context, params *protocol.DocumentRangeFormattingParams) ([]protocol.TextEdit, error)

func (*Server) References

func (s *Server) References(ctx context.Context, params *protocol.ReferenceParams) ([]protocol.Location, error)

func (*Server) Rename

func (s *Server) Rename(ctx context.Context, params *protocol.RenameParams) (*protocol.WorkspaceEdit, error)

func (*Server) Resolve added in v0.0.13

func (*Server) ResolveCodeLens added in v0.0.13

func (s *Server) ResolveCodeLens(context.Context, *protocol.CodeLens) (*protocol.CodeLens, error)
func (s *Server) ResolveDocumentLink(context.Context, *protocol.DocumentLink) (*protocol.DocumentLink, error)

func (*Server) Run

func (s *Server) Run(ctx context.Context) error

func (*Server) SelectionRange added in v0.0.13

func (*Server) SetTraceNotification added in v0.0.13

func (s *Server) SetTraceNotification(context.Context, *protocol.SetTraceParams) error

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context) error

func (*Server) SignatureHelp

func (*Server) Symbol added in v0.0.6

func (*Server) TypeDefinition

func (s *Server) TypeDefinition(ctx context.Context, params *protocol.TextDocumentPositionParams) ([]protocol.Location, error)

func (*Server) WillSave

Directories

Path Synopsis
Package browser provides utilities for interacting with users' browsers.
Package browser provides utilities for interacting with users' browsers.
Package cmd handles the gopls command line.
Package cmd handles the gopls command line.
Package diff implements the Myers diff algorithm.
Package diff implements the Myers diff algorithm.
Package fuzzy implements a fuzzy matching algorithm.
Package fuzzy implements a fuzzy matching algorithm.
Package protocol contains the structs that map directly to the wire format of the "Language Server Protocol".
Package protocol contains the structs that map directly to the wire format of the "Language Server Protocol".
Package snippet implements the specification for the LSP snippet format.
Package snippet implements the specification for the LSP snippet format.
Package source provides core features for use by Go editors and tools.
Package source provides core features for use by Go editors and tools.
Package telemetry provides the hooks and adapters to allow use of telemetry throughout gopls.
Package telemetry provides the hooks and adapters to allow use of telemetry throughout gopls.
metric
Package metric aggregates stats into metrics that can be exported.
Package metric aggregates stats into metrics that can be exported.
stats
Package stats provides support for recording telemetry statistics.
Package stats provides support for recording telemetry statistics.
tag
Package tag provides support for telemetry tagging.
Package tag provides support for telemetry tagging.
trace
Package tag adds support for telemetry tracing.
Package tag adds support for telemetry tracing.
worker
Package worker provides a very simple mechanism to allow telemetry packages to work cooperatively and efficiently.
Package worker provides a very simple mechanism to allow telemetry packages to work cooperatively and efficiently.

Jump to

Keyboard shortcuts

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