Documentation ¶
Index ¶
- func FromProtocolEdits(m *protocol.ColumnMapper, edits []protocol.TextEdit) ([]source.TextEdit, error)
- func RunServerOnAddress(ctx context.Context, cache source.Cache, addr string, ...) error
- func RunServerOnPort(ctx context.Context, cache source.Cache, port int, ...) error
- func ToProtocolEdits(m *protocol.ColumnMapper, edits []source.TextEdit) ([]protocol.TextEdit, error)
- type Server
- func (s *Server) CodeAction(ctx context.Context, params *protocol.CodeActionParams) ([]protocol.CodeAction, error)
- func (s *Server) CodeLens(context.Context, *protocol.CodeLensParams) ([]protocol.CodeLens, error)
- func (s *Server) ColorPresentation(context.Context, *protocol.ColorPresentationParams) ([]protocol.ColorPresentation, error)
- func (s *Server) Completion(ctx context.Context, params *protocol.CompletionParams) (*protocol.CompletionList, error)
- func (s *Server) Declaration(context.Context, *protocol.TextDocumentPositionParams) ([]protocol.DeclarationLink, error)
- func (s *Server) Definition(ctx context.Context, params *protocol.TextDocumentPositionParams) ([]protocol.Location, error)
- func (s *Server) Diagnostics(ctx context.Context, view source.View, uri span.URI)
- func (s *Server) DidChange(ctx context.Context, params *protocol.DidChangeTextDocumentParams) error
- func (s *Server) DidChangeConfiguration(context.Context, *protocol.DidChangeConfigurationParams) error
- func (s *Server) DidChangeWatchedFiles(context.Context, *protocol.DidChangeWatchedFilesParams) error
- func (s *Server) DidChangeWorkspaceFolders(ctx context.Context, params *protocol.DidChangeWorkspaceFoldersParams) error
- func (s *Server) DidClose(ctx context.Context, params *protocol.DidCloseTextDocumentParams) error
- func (s *Server) DidOpen(ctx context.Context, params *protocol.DidOpenTextDocumentParams) error
- func (s *Server) DidSave(ctx context.Context, params *protocol.DidSaveTextDocumentParams) error
- func (s *Server) DocumentColor(context.Context, *protocol.DocumentColorParams) ([]protocol.ColorInformation, error)
- 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 (s *Server) DocumentSymbol(ctx context.Context, params *protocol.DocumentSymbolParams) ([]protocol.DocumentSymbol, error)
- func (s *Server) ExecuteCommand(context.Context, *protocol.ExecuteCommandParams) (interface{}, error)
- func (s *Server) Exit(ctx context.Context) error
- func (s *Server) FoldingRange(context.Context, *protocol.FoldingRangeParams) ([]protocol.FoldingRange, error)
- func (s *Server) Formatting(ctx context.Context, params *protocol.DocumentFormattingParams) ([]protocol.TextEdit, error)
- func (s *Server) Hover(ctx context.Context, params *protocol.TextDocumentPositionParams) (*protocol.Hover, error)
- func (s *Server) Implementation(context.Context, *protocol.TextDocumentPositionParams) ([]protocol.Location, error)
- func (s *Server) Initialize(ctx context.Context, params *protocol.InitializeParams) (*protocol.InitializeResult, error)
- func (s *Server) Initialized(ctx context.Context, params *protocol.InitializedParams) error
- func (s *Server) LogTraceNotification(context.Context, *protocol.LogTraceParams) error
- func (s *Server) OnTypeFormatting(context.Context, *protocol.DocumentOnTypeFormattingParams) ([]protocol.TextEdit, error)
- func (s *Server) PrepareRename(context.Context, *protocol.TextDocumentPositionParams) (*protocol.Range, error)
- func (s *Server) RangeFormatting(ctx context.Context, params *protocol.DocumentRangeFormattingParams) ([]protocol.TextEdit, error)
- func (s *Server) References(ctx context.Context, params *protocol.ReferenceParams) ([]protocol.Location, error)
- func (s *Server) Rename(ctx context.Context, params *protocol.RenameParams) (*protocol.WorkspaceEdit, error)
- func (s *Server) Resolve(ctx context.Context, item *protocol.CompletionItem) (*protocol.CompletionItem, error)
- func (s *Server) ResolveCodeLens(context.Context, *protocol.CodeLens) (*protocol.CodeLens, error)
- func (s *Server) ResolveDocumentLink(context.Context, *protocol.DocumentLink) (*protocol.DocumentLink, error)
- func (s *Server) Run(ctx context.Context) error
- func (s *Server) SelectionRange(context.Context, *protocol.SelectionRangeParams) ([]protocol.SelectionRange, error)
- func (s *Server) SetTraceNotification(context.Context, *protocol.SetTraceParams) error
- func (s *Server) Shutdown(ctx context.Context) error
- func (s *Server) SignatureHelp(ctx context.Context, params *protocol.TextDocumentPositionParams) (*protocol.SignatureHelp, error)
- func (s *Server) Symbol(context.Context, *protocol.WorkspaceSymbolParams) ([]protocol.SymbolInformation, error)
- func (s *Server) TypeDefinition(ctx context.Context, params *protocol.TextDocumentPositionParams) ([]protocol.Location, error)
- func (s *Server) WillSave(context.Context, *protocol.WillSaveTextDocumentParams) error
- func (s *Server) WillSaveWaitUntil(context.Context, *protocol.WillSaveTextDocumentParams) ([]protocol.TextEdit, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromProtocolEdits ¶
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 ¶
Types ¶
type Server ¶
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) ColorPresentation ¶
func (s *Server) ColorPresentation(context.Context, *protocol.ColorPresentationParams) ([]protocol.ColorPresentation, error)
func (*Server) Completion ¶
func (s *Server) Completion(ctx context.Context, params *protocol.CompletionParams) (*protocol.CompletionList, error)
func (*Server) Declaration ¶
func (s *Server) Declaration(context.Context, *protocol.TextDocumentPositionParams) ([]protocol.DeclarationLink, error)
func (*Server) Definition ¶
func (*Server) Diagnostics ¶
func (*Server) DidChangeConfiguration ¶
func (*Server) DidChangeWatchedFiles ¶
func (*Server) DidChangeWorkspaceFolders ¶
func (*Server) DocumentColor ¶
func (s *Server) DocumentColor(context.Context, *protocol.DocumentColorParams) ([]protocol.ColorInformation, error)
func (*Server) DocumentHighlight ¶
func (s *Server) DocumentHighlight(ctx context.Context, params *protocol.TextDocumentPositionParams) ([]protocol.DocumentHighlight, error)
func (*Server) DocumentLink ¶
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 (*Server) FoldingRange ¶
func (s *Server) FoldingRange(context.Context, *protocol.FoldingRangeParams) ([]protocol.FoldingRange, error)
func (*Server) Formatting ¶
func (*Server) Implementation ¶
func (*Server) Initialize ¶
func (s *Server) Initialize(ctx context.Context, params *protocol.InitializeParams) (*protocol.InitializeResult, error)
func (*Server) Initialized ¶
func (*Server) LogTraceNotification ¶
func (*Server) OnTypeFormatting ¶
func (*Server) PrepareRename ¶
func (*Server) RangeFormatting ¶
func (*Server) References ¶
func (*Server) Rename ¶
func (s *Server) Rename(ctx context.Context, params *protocol.RenameParams) (*protocol.WorkspaceEdit, error)
func (*Server) Resolve ¶
func (s *Server) Resolve(ctx context.Context, item *protocol.CompletionItem) (*protocol.CompletionItem, error)
func (*Server) ResolveCodeLens ¶
func (*Server) ResolveDocumentLink ¶
func (s *Server) ResolveDocumentLink(context.Context, *protocol.DocumentLink) (*protocol.DocumentLink, error)
func (*Server) SelectionRange ¶
func (s *Server) SelectionRange(context.Context, *protocol.SelectionRangeParams) ([]protocol.SelectionRange, error)
func (*Server) SetTraceNotification ¶
func (*Server) SignatureHelp ¶
func (s *Server) SignatureHelp(ctx context.Context, params *protocol.TextDocumentPositionParams) (*protocol.SignatureHelp, error)
func (*Server) Symbol ¶
func (s *Server) Symbol(context.Context, *protocol.WorkspaceSymbolParams) ([]protocol.SymbolInformation, error)
func (*Server) TypeDefinition ¶
func (*Server) WillSaveWaitUntil ¶
Source Files ¶
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. |
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. |
metric
Package metric aggregates stats into metrics that can be exported.
|
Package metric aggregates stats into metrics that can be exported. |
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. |
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 tracins.
|
Package tag adds support for telemetry tracins. |
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. |
Click to show internal directories.
Click to hide internal directories.