server

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CELSemanticTokenProvider added in v0.12.3

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

func (*CELSemanticTokenProvider) SemanticTokens added in v0.12.3

func (p *CELSemanticTokenProvider) SemanticTokens() map[uint32][]*SemanticToken

func (*CELSemanticTokenProvider) VisitEntryExpr added in v0.12.3

func (p *CELSemanticTokenProvider) VisitEntryExpr(expr celast.EntryExpr)

func (*CELSemanticTokenProvider) VisitExpr added in v0.12.3

func (p *CELSemanticTokenProvider) VisitExpr(expr celast.Expr)

type Completer

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

func NewCompleter

func NewCompleter(c *compiler.Compiler, logger *slog.Logger) *Completer

func (*Completer) Completion

func (c *Completer) Completion(ctx context.Context, importPaths []string, path string, content []byte, pos source.Position) (*ast.NodeInfo, []string, error)

type FederationOptionType added in v0.12.3

type FederationOptionType int
const (
	ServiceOption FederationOptionType = iota
	MethodOption
	MessageOption
	FieldOption
	EnumOption
	EnumValueOption
)

type Handler

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

func NewHandler

func NewHandler(client protocol.Client, w io.Writer, importPaths []string) *Handler

func (*Handler) CodeAction

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

func (*Handler) CodeLens

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

func (*Handler) CodeLensRefresh

func (h *Handler) CodeLensRefresh(ctx context.Context) error

func (*Handler) CodeLensResolve

func (h *Handler) CodeLensResolve(ctx context.Context, params *protocol.CodeLens) (*protocol.CodeLens, error)

func (*Handler) ColorPresentation

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

func (*Handler) Completion

func (h *Handler) Completion(ctx context.Context, params *protocol.CompletionParams) (*protocol.CompletionList, error)

func (*Handler) CompletionResolve

func (h *Handler) CompletionResolve(ctx context.Context, params *protocol.CompletionItem) (*protocol.CompletionItem, error)

func (*Handler) Declaration

func (h *Handler) Declaration(ctx context.Context, params *protocol.DeclarationParams) ([]protocol.Location, error)

func (*Handler) Definition

func (h *Handler) Definition(ctx context.Context, params *protocol.DefinitionParams) ([]protocol.Location, error)
func (h *Handler) DefinitionWithLink(ctx context.Context, params *protocol.DefinitionParams) ([]protocol.LocationLink, error)

func (*Handler) DidChange

func (h *Handler) DidChange(ctx context.Context, params *protocol.DidChangeTextDocumentParams) error

func (*Handler) DidChangeConfiguration

func (h *Handler) DidChangeConfiguration(ctx context.Context, params *protocol.DidChangeConfigurationParams) error

func (*Handler) DidChangeWatchedFiles

func (h *Handler) DidChangeWatchedFiles(ctx context.Context, params *protocol.DidChangeWatchedFilesParams) error

func (*Handler) DidChangeWorkspaceFolders

func (h *Handler) DidChangeWorkspaceFolders(ctx context.Context, params *protocol.DidChangeWorkspaceFoldersParams) error

func (*Handler) DidClose

func (h *Handler) DidClose(ctx context.Context, params *protocol.DidCloseTextDocumentParams) error

func (*Handler) DidCreateFiles

func (h *Handler) DidCreateFiles(ctx context.Context, params *protocol.CreateFilesParams) error

func (*Handler) DidDeleteFiles

func (h *Handler) DidDeleteFiles(ctx context.Context, params *protocol.DeleteFilesParams) error

func (*Handler) DidOpen

func (*Handler) DidRenameFiles

func (h *Handler) DidRenameFiles(ctx context.Context, params *protocol.RenameFilesParams) error

func (*Handler) DidSave

func (*Handler) DocumentColor

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

func (*Handler) DocumentHighlight

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

func (*Handler) DocumentLinkResolve

func (h *Handler) DocumentLinkResolve(ctx context.Context, params *protocol.DocumentLink) (*protocol.DocumentLink, error)

func (*Handler) DocumentSymbol

func (h *Handler) DocumentSymbol(ctx context.Context, params *protocol.DocumentSymbolParams) ([]interface{}, error)

func (*Handler) ExecuteCommand

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

func (*Handler) Exit

func (h *Handler) Exit(ctx context.Context) error

func (*Handler) FoldingRanges

func (h *Handler) FoldingRanges(ctx context.Context, params *protocol.FoldingRangeParams) ([]protocol.FoldingRange, error)

func (*Handler) Formatting

func (*Handler) Hover

func (h *Handler) Hover(ctx context.Context, params *protocol.HoverParams) (*protocol.Hover, error)

func (*Handler) Implementation

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

func (*Handler) Initialize

func (*Handler) Initialized

func (h *Handler) Initialized(ctx context.Context, params *protocol.InitializedParams) error

func (*Handler) LinkedEditingRange

func (*Handler) LogTrace

func (h *Handler) LogTrace(ctx context.Context, params *protocol.LogTraceParams) error

func (*Handler) Moniker

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

func (*Handler) OnTypeFormatting

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

func (*Handler) PrepareCallHierarchy

func (h *Handler) PrepareCallHierarchy(ctx context.Context, params *protocol.CallHierarchyPrepareParams) ([]protocol.CallHierarchyItem, error)

func (*Handler) PrepareRename

func (h *Handler) PrepareRename(ctx context.Context, params *protocol.PrepareRenameParams) (*protocol.Range, error)

func (*Handler) RangeFormatting

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

func (*Handler) References

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

func (*Handler) Rename

func (*Handler) Request

func (h *Handler) Request(ctx context.Context, method string, params interface{}) (interface{}, error)

func (*Handler) SemanticTokensFull

func (h *Handler) SemanticTokensFull(ctx context.Context, params *protocol.SemanticTokensParams) (*protocol.SemanticTokens, error)

func (*Handler) SemanticTokensFullDelta

func (h *Handler) SemanticTokensFullDelta(ctx context.Context, params *protocol.SemanticTokensDeltaParams) (interface{}, error)

func (*Handler) SemanticTokensRange

func (h *Handler) SemanticTokensRange(ctx context.Context, params *protocol.SemanticTokensRangeParams) (*protocol.SemanticTokens, error)

func (*Handler) SemanticTokensRefresh

func (h *Handler) SemanticTokensRefresh(ctx context.Context) error

func (*Handler) SetTrace

func (h *Handler) SetTrace(ctx context.Context, params *protocol.SetTraceParams) error

func (*Handler) ShowDocument

func (*Handler) Shutdown

func (h *Handler) Shutdown(ctx context.Context) error

func (*Handler) SignatureHelp

func (h *Handler) SignatureHelp(ctx context.Context, params *protocol.SignatureHelpParams) (*protocol.SignatureHelp, error)

func (*Handler) Symbols

func (*Handler) TypeDefinition

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

func (*Handler) WillCreateFiles

func (h *Handler) WillCreateFiles(ctx context.Context, params *protocol.CreateFilesParams) (*protocol.WorkspaceEdit, error)

func (*Handler) WillDeleteFiles

func (h *Handler) WillDeleteFiles(ctx context.Context, params *protocol.DeleteFilesParams) (*protocol.WorkspaceEdit, error)

func (*Handler) WillRenameFiles

func (h *Handler) WillRenameFiles(ctx context.Context, params *protocol.RenameFilesParams) (*protocol.WorkspaceEdit, error)

func (*Handler) WillSave

func (h *Handler) WillSave(ctx context.Context, params *protocol.WillSaveTextDocumentParams) error

func (*Handler) WillSaveWaitUntil

func (h *Handler) WillSaveWaitUntil(ctx context.Context, params *protocol.WillSaveTextDocumentParams) ([]protocol.TextEdit, error)

func (*Handler) WorkDoneProgressCancel

func (h *Handler) WorkDoneProgressCancel(ctx context.Context, params *protocol.WorkDoneProgressCancelParams) error

type SemanticToken added in v0.12.3

type SemanticToken struct {
	Line      uint32
	Col       uint32
	Text      string
	Type      string
	Modifiers []string
}

type SemanticTokenProvider added in v0.12.3

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

func NewSemanticTokenProvider added in v0.12.3

func NewSemanticTokenProvider(logger *slog.Logger, file *source.File, tokenTypeMap map[string]uint32, tokenModifierMap map[string]uint32) *SemanticTokenProvider

func (*SemanticTokenProvider) SemanticTokens added in v0.12.3

func (p *SemanticTokenProvider) SemanticTokens() *protocol.SemanticTokens

type SemanticTokenProviderContext added in v0.12.3

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

type Server

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

func New

func New(opts ...ServerOption) *Server

func (*Server) Run

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

type ServerOption

type ServerOption func(*Server)

func ImportPathsOption

func ImportPathsOption(paths []string) ServerOption

func LogFileOption

func LogFileOption(f *os.File) ServerOption

Jump to

Keyboard shortcuts

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