lspimpl

package
v0.455.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package lsp implements LSP for gopls.

Index

Constants

This section is empty.

Variables

View Source
var ServerExitFunc = os.Exit

ServerExitFunc is used to exit when requested by the client. It is mutable for testing purposes.

Functions

This section is empty.

Types

type Server

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

Server implements the protocol.Server interface.

func NewServer

func NewServer(client protocol.Client) *Server

NewServer creates an LSP server and binds it to handle incoming client messages on on the supplied stream.

func (*Server) CodeAction

func (*Server) CodeLens

func (*Server) Definition

func (s *Server) Definition(ctx context.Context, params *protocol.DefinitionParams) (protocol.Definition, error)

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(context.Context, *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) DocumentSymbol

func (s *Server) DocumentSymbol(context.Context, *protocol.DocumentSymbolParams) ([]interface{}, error)

func (*Server) ExecuteCommand

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

func (*Server) Exit

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

func (*Server) FoldingRange

func (*Server) Hover

func (s *Server) Hover(ctx context.Context, params *protocol.HoverParams) (*protocol.Hover, error)

func (*Server) Initialize

func (s *Server) Initialize(ctx context.Context, params *protocol.ParamInitialize) (*protocol.InitializeResult, error)

func (*Server) Initialized

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

func (*Server) LogTraceNotification

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

func (*Server) NonstandardRequest

func (s *Server) NonstandardRequest(ctx context.Context, method string, params interface{}) (interface{}, error)

func (*Server) PrepareRename

func (*Server) Progress

func (*Server) References

func (*Server) Rename

func (*Server) ResolveCodeLens

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

func (*Server) SemanticTokensEdits

func (s *Server) SemanticTokensEdits(context.Context, *protocol.SemanticTokensEditsParams) (interface{}, error)

func (*Server) SetTraceNotification

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

func (*Server) Shutdown

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

func (*Server) WillSave

func (*Server) WorkDoneProgressCancel

func (s *Server) WorkDoneProgressCancel(context.Context, *protocol.WorkDoneProgressCancelParams) error

func (*Server) WorkDoneProgressCreate

func (s *Server) WorkDoneProgressCreate(context.Context, *protocol.WorkDoneProgressCreateParams) error

type SyslErrorListener

type SyslErrorListener struct {
	antlr.ErrorListener

	Errors []protocol.Diagnostic
	// contains filtered or unexported fields
}

func NewSyslErrorListener

func NewSyslErrorListener(ctx context.Context, client protocol.Client) *SyslErrorListener

func (*SyslErrorListener) ReportAmbiguity

func (l *SyslErrorListener) ReportAmbiguity(recognizer antlr.Parser, dfa *antlr.DFA, startIndex, stopIndex int, exact bool, ambigAlts *antlr.BitSet, configs antlr.ATNConfigSet)

func (*SyslErrorListener) ReportAttemptingFullContext

func (l *SyslErrorListener) ReportAttemptingFullContext(recognizer antlr.Parser, dfa *antlr.DFA, startIndex, stopIndex int, conflictingAlts *antlr.BitSet, configs antlr.ATNConfigSet)

func (*SyslErrorListener) ReportContextSensitivity

func (l *SyslErrorListener) ReportContextSensitivity(recognizer antlr.Parser, dfa *antlr.DFA, startIndex, stopIndex, prediction int, configs antlr.ATNConfigSet)

func (*SyslErrorListener) SyntaxError

func (l *SyslErrorListener) SyntaxError(recognizer antlr.Recognizer, offendingSymbol interface{}, line, column int, msg string, e antlr.RecognitionException)

Directories

Path Synopsis
lspframework
jsonrpc2
Package jsonrpc2 is a minimal implementation of the JSON RPC 2 spec.
Package jsonrpc2 is a minimal implementation of the JSON RPC 2 spec.
jsonrpc2/servertest
Package servertest provides utilities for running tests against a remote LSP server.
Package servertest provides utilities for running tests against a remote LSP server.
lsp/debug
Package debug exports debug information for gopls.
Package debug exports debug information for gopls.
lsp/helper
Invoke with //go:generate helper/helper -t Server -d protocol/tsserver.go -u lsp -o server_gen.go invoke in lspframework/lsp
Invoke with //go:generate helper/helper -t Server -d protocol/tsserver.go -u lsp -o server_gen.go invoke in lspframework/lsp
lsp/protocol
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".
lsp/telemetry
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.
span
Package span contains support for representing with positions and ranges in text files.
Package span contains support for representing with positions and ranges in text files.
telemetry
Package telemetry provides an opinionated set of packages that cover the main concepts of telemetry in an implementation agnostic way.
Package telemetry provides an opinionated set of packages that cover the main concepts of telemetry in an implementation agnostic way.
telemetry/export
Package export holds the definition of the telemetry Exporter interface, along with some simple implementations.
Package export holds the definition of the telemetry Exporter interface, along with some simple implementations.
telemetry/export/ocagent
Package ocagent adds the ability to export all telemetry to an ocagent.
Package ocagent adds the ability to export all telemetry to an ocagent.
telemetry/log
Package log is a context based logging package, designed to interact well with both the lsp protocol and the other telemetry packages.
Package log is a context based logging package, designed to interact well with both the lsp protocol and the other telemetry packages.
telemetry/metric
Package metric aggregates stats into metrics that can be exported.
Package metric aggregates stats into metrics that can be exported.
telemetry/stats
Package stats provides support for recording telemetry statistics.
Package stats provides support for recording telemetry statistics.
telemetry/tag
Package tag provides support for telemetry tagging.
Package tag provides support for telemetry tagging.
telemetry/trace
Package trace adds support for telemetry tracing.
Package trace adds support for telemetry tracing.
telemetry/unit
Package unit holds the definitions for the units you can use in telemetry.
Package unit holds the definitions for the units you can use in telemetry.
xcontext
Package xcontext is a package to offer the extra functionality we need from contexts that is not available from the standard context package.
Package xcontext is a package to offer the extra functionality we need from contexts that is not available from the standard context package.
Package lsprpc implements a jsonrpc2.StreamServer that may be used to serve the LSP on a jsonrpc2 channel.
Package lsprpc implements a jsonrpc2.StreamServer that may be used to serve the LSP on a jsonrpc2 channel.

Jump to

Keyboard shortcuts

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