Help us shape the future of Go! Take the 2026 Go Developer Survey

proxy

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	protocol.Client
	// contains filtered or unexported fields
}

func NewClient

func NewClient(c protocol.Client, smc *SourceMapCache, dc *DiagnosticsCache, logger zerolog.Logger) *Client

func (*Client) PublishDiagnostics

func (c *Client) PublishDiagnostics(ctx context.Context, params *protocol.PublishDiagnosticsParams) error

func (*Client) RegisterCapability added in v0.8.5

func (c *Client) RegisterCapability(ctx context.Context, params *protocol.RegistrationParams) error

func (*Client) ShowMessage

func (c *Client) ShowMessage(ctx context.Context, params *protocol.ShowMessageParams) error

type DiagnosticsCache

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

func NewDiagnosticsCache

func NewDiagnosticsCache() *DiagnosticsCache

func (*DiagnosticsCache) ClearParserDiagnostics added in v0.8.4

func (dc *DiagnosticsCache) ClearParserDiagnostics(uri string) []protocol.Diagnostic

func (*DiagnosticsCache) Delete added in v0.8.4

func (dc *DiagnosticsCache) Delete(uri string)

func (*DiagnosticsCache) WithGeneratedGoDiagnostics added in v0.8.4

func (dc *DiagnosticsCache) WithGeneratedGoDiagnostics(uri string, diagnostics []protocol.Diagnostic) []protocol.Diagnostic

func (*DiagnosticsCache) WithParserDiagnostics added in v0.8.4

func (dc *DiagnosticsCache) WithParserDiagnostics(uri string, diagnostics []protocol.Diagnostic) []protocol.Diagnostic

type Document

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

func NewDocument

func NewDocument(text string) *Document

func (*Document) Apply

func (d *Document) Apply(r *protocol.Range, text string)

func (*Document) String

func (d *Document) String() string

type DocumentContents

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

func NewDocumentContents

func NewDocumentContents() *DocumentContents

func (*DocumentContents) Apply

func (*DocumentContents) Delete

func (dc *DocumentContents) Delete(uri string)

func (*DocumentContents) Get

func (dc *DocumentContents) Get(uri string) (d *Document, ok bool)

func (*DocumentContents) Set

func (dc *DocumentContents) Set(uri string, d *Document)

func (*DocumentContents) URIs

func (dc *DocumentContents) URIs() (uris []string)

type Server

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

func (*Server) CodeAction

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

CodeAction is called when the client requests code actions.

func (*Server) CodeLens

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

CodeLens is called when the client requests code lenses.

func (*Server) ColorPresentation

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

ColorPresentation is called when the client requests color presentations.

func (*Server) Completion

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

Completion is called when the client requests completion information.

func (*Server) Declaration

Declaration is called when the client requests declaration information.

func (*Server) Definition

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

Definition is called when the client requests definition information.

func (*Server) DidChange

func (s *Server) DidChange(ctx context.Context, params *protocol.DidChangeTextDocumentParams) 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) DocumentColor

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

func (*Server) DocumentSymbol

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

DocumentSymbol is called when the client requests document symbols.

func (*Server) FoldingRanges

func (*Server) Formatting

func (*Server) Hover

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

func (*Server) Implementation

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

func (*Server) Initialize

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

Initialize is called when the client starts up.

It returns the capabilities of the server.

func (*Server) InlayHint

InlayHint is called when the client requests inlay hints.

func (*Server) Moniker

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

func (*Server) OnTypeFormatting

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

func (*Server) PrepareRename

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 (s *Server) ResolveDocumentLink(ctx context.Context, params *protocol.DocumentLink) (*protocol.DocumentLink, error)

func (*Server) SemanticTokensFull

func (s *Server) SemanticTokensFull(ctx context.Context, params *protocol.SemanticTokensParams) (*protocol.SemanticTokens, error)

func (*Server) SemanticTokensFullDelta

func (s *Server) SemanticTokensFullDelta(_ context.Context, params *protocol.SemanticTokensDeltaParams) (any, error)

func (*Server) SemanticTokensRange

func (s *Server) SemanticTokensRange(ctx context.Context, params *protocol.SemanticTokensRangeParams) (*protocol.SemanticTokens, error)

func (*Server) SignatureHelp

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

func (*Server) TypeDefinition

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

func (*Server) WillSave

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

type SourceMapCache

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

func NewSourceMapCache

func NewSourceMapCache() *SourceMapCache

func (*SourceMapCache) Delete

func (smc *SourceMapCache) Delete(uri string)

func (*SourceMapCache) Get

func (smc *SourceMapCache) Get(uri string) (sourceMap *compiler.SourceMap, ok bool)

func (*SourceMapCache) Set

func (smc *SourceMapCache) Set(uri string, sourceMap *compiler.SourceMap)

Jump to

Keyboard shortcuts

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