tools: golang.org/x/tools/internal/lsp Index | Files | Directories

package lsp

import "golang.org/x/tools/internal/lsp"

Package lsp implements LSP for gopls.

Index

Package Files

code_action.go command.go completion.go definition.go diagnostics.go folding_range.go format.go general.go highlight.go hover.go implementation.go link.go references.go rename.go server.go signature_help.go symbols.go text_synchronization.go watched_files.go workspace.go

func RunServerOnAddress Uses

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 Uses

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.

type Server Uses

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

func NewClientServer Uses

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

NewClientServer

func NewServer Uses

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 Uses

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

func (*Server) CodeLens Uses

func (s *Server) CodeLens(context.Context, *protocol.CodeLensParams) ([]protocol.CodeLens, error)

func (*Server) ColorPresentation Uses

func (s *Server) ColorPresentation(context.Context, *protocol.ColorPresentationParams) ([]protocol.ColorPresentation, error)

func (*Server) Completion Uses

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

func (*Server) Declaration Uses

func (s *Server) Declaration(context.Context, *protocol.DeclarationParams) ([]protocol.DeclarationLink, error)

func (*Server) Definition Uses

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

func (*Server) DidChange Uses

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

func (*Server) DidChangeConfiguration Uses

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

func (*Server) DidChangeWatchedFiles Uses

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

func (*Server) DidChangeWorkspaceFolders Uses

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

func (*Server) DidClose Uses

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

func (*Server) DidOpen Uses

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

func (*Server) DidSave Uses

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

func (*Server) DocumentColor Uses

func (s *Server) DocumentColor(context.Context, *protocol.DocumentColorParams) ([]protocol.ColorInformation, error)

func (*Server) DocumentHighlight Uses

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

func (*Server) DocumentSymbol Uses

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

func (*Server) ExecuteCommand Uses

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

func (*Server) Exit Uses

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

func (*Server) FoldingRange Uses

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

func (*Server) Formatting Uses

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

func (*Server) Hover Uses

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

func (*Server) Implementation Uses

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

func (*Server) Initialize Uses

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

func (*Server) Initialized Uses

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

func (*Server) LogTraceNotification Uses

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

func (*Server) OnTypeFormatting Uses

func (s *Server) OnTypeFormatting(context.Context, *protocol.DocumentOnTypeFormattingParams) ([]protocol.TextEdit, error)

func (*Server) PrepareRename Uses

func (s *Server) PrepareRename(ctx context.Context, params *protocol.PrepareRenameParams) (*protocol.Range, error)

func (*Server) Progress Uses

func (s *Server) Progress(context.Context, *protocol.ProgressParams) error

func (*Server) RangeFormatting Uses

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

func (*Server) References Uses

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

func (*Server) Rename Uses

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

func (*Server) Resolve Uses

func (s *Server) Resolve(ctx context.Context, item *protocol.CompletionItem) (*protocol.CompletionItem, error)

func (*Server) ResolveCodeLens Uses

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 Uses

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

func (*Server) SelectionRange Uses

func (s *Server) SelectionRange(context.Context, *protocol.SelectionRangeParams) ([]protocol.SelectionRange, error)

func (*Server) SetTraceNotification Uses

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

func (*Server) Shutdown Uses

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

func (*Server) SignatureHelp Uses

func (s *Server) SignatureHelp(ctx context.Context, params *protocol.SignatureHelpParams) (*protocol.SignatureHelp, error)

func (*Server) Symbol Uses

func (s *Server) Symbol(context.Context, *protocol.WorkspaceSymbolParams) ([]protocol.SymbolInformation, error)

func (*Server) TypeDefinition Uses

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

func (*Server) WillSave Uses

func (s *Server) WillSave(context.Context, *protocol.WillSaveTextDocumentParams) error

func (*Server) WillSaveWaitUntil Uses

func (s *Server) WillSaveWaitUntil(context.Context, *protocol.WillSaveTextDocumentParams) ([]protocol.TextEdit, error)

Directories

PathSynopsis
browserPackage browser provides utilities for interacting with users' browsers.
cachePackage cache implements the caching layer for gopls.
cmdPackage cmd handles the gopls command line.
cmd/testPackage cmdtest contains the test suite for the command line behavior of gopls.
debugPackage debug exports debug information for gopls.
diffPackage diff supports a pluggable diff algorithm.
diff/difftestPackage difftest supplies a set of tests that will operate on any implementation of a diff algorithm as exposed by "golang.org/x/tools/internal/lsp/diff"
diff/myersPackage myers implements the Myers diff algorithm.
fuzzyPackage fuzzy implements a fuzzy matching algorithm.
protocolPackage protocol contains the structs that map directly to the wire format of the "Language Server Protocol".
snippetPackage snippet implements the specification for the LSP snippet format.
sourcePackage source provides core features for use by Go editors and tools.
telemetryPackage telemetry provides the hooks and adapters to allow use of telemetry throughout gopls.
testsPackage tests exports functionality to be used across a variety of gopls tests.

Package lsp imports 25 packages (graph) and is imported by 3 packages. Updated 2019-11-15. Refresh now. Tools for package owners.