languageserver

package module
v0.0.0-...-1bcaff1 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BuiltAt string

Functions

func FindInRepository

func FindInRepository[T referrable](name string, kind string, repo []yaml.Node) (*yaml.Node, *T, error)

func LoadRepository

func LoadRepository(at string) ([]yaml.Node, error)

func ReferrableDescription

func ReferrableDescription(item referrable, description string) protocol.MarkupContent

func StartServer

func StartServer(logger *zap.Logger, configurationPath string, logClientIn string)

StartServer starts the language server. It reads from stdin and writes to stdout. If logClientIn is not empty, it will log the client's request and responses to respectively client-request-from.log and client-response-to.log, in the directory specified by logClientIn.

Types

type DescriptionFile

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

func CurrentFile

func CurrentFile(uri protocol.URI, cursor protocol.Position) (DescriptionFile, error)

func (DescriptionFile) CurrentLine

func (d DescriptionFile) CurrentLine() string

func (DescriptionFile) InFrontmatter

func (d DescriptionFile) InFrontmatter() (closestKey string, closestNode *yaml.Node, found bool)

type Handler

type Handler struct {
	protocol.Server
	Logger *zap.Logger
}

func NewHandler

func NewHandler(ctx context.Context, server protocol.Server, logger *zap.Logger) (Handler, context.Context, error)

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 (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 (Handler) DidChange

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 (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 (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 (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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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