Documentation ¶
Index ¶
- func CmpPositions(a, b Position) int
- func FromContext(ctx context.Context) *zap.Logger
- func WithContext(ctx context.Context, logger *zap.Logger) context.Context
- type LanguageServer
- func (ls *LanguageServer) CodeAction(ctx context.Context, params *CodeActionParams) (result []CodeAction, err error)
- func (ls *LanguageServer) CodeLens(ctx context.Context, params *CodeLensParams) (result []CodeLens, err error)
- func (ls *LanguageServer) CodeLensRefresh(ctx context.Context) (err error)
- func (ls *LanguageServer) CodeLensResolve(ctx context.Context, params *CodeLens) (result *CodeLens, err error)
- func (ls *LanguageServer) ColorPresentation(ctx context.Context, params *ColorPresentationParams) (result []ColorPresentation, err error)
- func (ls *LanguageServer) Completion(ctx context.Context, params *CompletionParams) (result *CompletionList, err error)
- func (ls *LanguageServer) CompletionResolve(ctx context.Context, params *CompletionItem) (result *CompletionItem, err error)
- func (ls *LanguageServer) Declaration(ctx context.Context, params *DeclarationParams) (result []Location, err error)
- func (ls *LanguageServer) Definition(ctx context.Context, params *DefinitionParams) (result []Location, err error)
- func (ls *LanguageServer) DidChange(ctx context.Context, params *DidChangeTextDocumentParams) (err error)
- func (ls *LanguageServer) DidChangeConfiguration(ctx context.Context, params *DidChangeConfigurationParams) (err error)
- func (ls *LanguageServer) DidChangeWatchedFiles(ctx context.Context, params *DidChangeWatchedFilesParams) (err error)
- func (ls *LanguageServer) DidChangeWorkspaceFolders(ctx context.Context, params *DidChangeWorkspaceFoldersParams) (err error)
- func (ls *LanguageServer) DidClose(ctx context.Context, params *DidCloseTextDocumentParams) (err error)
- func (ls *LanguageServer) DidCreateFiles(ctx context.Context, params *CreateFilesParams) (err error)
- func (ls *LanguageServer) DidDeleteFiles(ctx context.Context, params *DeleteFilesParams) (err error)
- func (ls *LanguageServer) DidOpen(ctx context.Context, params *DidOpenTextDocumentParams) (err error)
- func (ls *LanguageServer) DidRenameFiles(ctx context.Context, params *RenameFilesParams) (err error)
- func (ls *LanguageServer) DidSave(ctx context.Context, params *DidSaveTextDocumentParams) (err error)
- func (ls *LanguageServer) DocumentColor(ctx context.Context, params *DocumentColorParams) (result []ColorInformation, err error)
- func (ls *LanguageServer) DocumentHighlight(ctx context.Context, params *DocumentHighlightParams) (result []DocumentHighlight, err error)
- func (ls *LanguageServer) DocumentLink(ctx context.Context, params *DocumentLinkParams) (result []DocumentLink, err error)
- func (ls *LanguageServer) DocumentLinkResolve(ctx context.Context, params *DocumentLink) (result *DocumentLink, err error)
- func (ls *LanguageServer) DocumentSymbol(ctx context.Context, params *DocumentSymbolParams) (result []any, err error)
- func (ls *LanguageServer) ExecuteCommand(ctx context.Context, params *ExecuteCommandParams) (result interface{}, err error)
- func (ls *LanguageServer) Exit(ctx context.Context) (err error)
- func (ls *LanguageServer) FoldingRanges(ctx context.Context, params *FoldingRangeParams) (result []FoldingRange, err error)
- func (ls *LanguageServer) Formatting(ctx context.Context, params *DocumentFormattingParams) (result []TextEdit, err error)
- func (ls *LanguageServer) Hover(ctx context.Context, params *HoverParams) (result *Hover, err error)
- func (ls *LanguageServer) Implementation(ctx context.Context, params *ImplementationParams) (result []Location, err error)
- func (ls *LanguageServer) IncomingCalls(ctx context.Context, params *CallHierarchyIncomingCallsParams) (result []CallHierarchyIncomingCall, err error)
- func (ls *LanguageServer) Initialize(ctx context.Context, params *InitializeParams) (result *InitializeResult, err error)
- func (ls *LanguageServer) Initialized(ctx context.Context, params *InitializedParams) (err error)
- func (ls *LanguageServer) LinkedEditingRange(ctx context.Context, params *LinkedEditingRangeParams) (result *LinkedEditingRanges, err error)
- func (ls *LanguageServer) Location(fset *token.FileSet, node ast.Node) Location
- func (ls *LanguageServer) LogTrace(ctx context.Context, params *LogTraceParams) (err error)
- func (ls *LanguageServer) Moniker(ctx context.Context, params *MonikerParams) (result []Moniker, err error)
- func (ls *LanguageServer) OnTypeFormatting(ctx context.Context, params *DocumentOnTypeFormattingParams) (result []TextEdit, err error)
- func (ls *LanguageServer) OutgoingCalls(ctx context.Context, params *CallHierarchyOutgoingCallsParams) (result []CallHierarchyOutgoingCall, err error)
- func (ls *LanguageServer) PrepareCallHierarchy(ctx context.Context, params *CallHierarchyPrepareParams) (result []CallHierarchyItem, err error)
- func (ls *LanguageServer) PrepareRename(ctx context.Context, params *PrepareRenameParams) (result *Range, err error)
- func (ls *LanguageServer) Range(fset *token.FileSet, node ast.Node) Range
- func (ls *LanguageServer) RangeFormatting(ctx context.Context, params *DocumentRangeFormattingParams) (result []TextEdit, err error)
- func (ls *LanguageServer) References(ctx context.Context, params *ReferenceParams) (result []Location, err error)
- func (ls *LanguageServer) Rename(ctx context.Context, params *RenameParams) (result *WorkspaceEdit, err error)
- func (ls *LanguageServer) Request(ctx context.Context, method string, params interface{}) (result interface{}, err error)
- func (ls *LanguageServer) SemanticTokensFull(ctx context.Context, params *SemanticTokensParams) (result *SemanticTokens, err error)
- func (ls *LanguageServer) SemanticTokensFullDelta(ctx context.Context, params *SemanticTokensDeltaParams) (result interface{}, err error)
- func (ls *LanguageServer) SemanticTokensRange(ctx context.Context, params *SemanticTokensRangeParams) (result *SemanticTokens, err error)
- func (ls *LanguageServer) SemanticTokensRefresh(ctx context.Context) (err error)
- func (ls *LanguageServer) SetTrace(ctx context.Context, params *SetTraceParams) (err error)
- func (ls *LanguageServer) ShowDocument(ctx context.Context, params *ShowDocumentParams) (result *ShowDocumentResult, err error)
- func (ls *LanguageServer) Shutdown(ctx context.Context) (err error)
- func (ls *LanguageServer) SignatureHelp(ctx context.Context, params *SignatureHelpParams) (result *SignatureHelp, err error)
- func (ls *LanguageServer) Symbols(ctx context.Context, params *WorkspaceSymbolParams) (result []SymbolInformation, err error)
- func (ls *LanguageServer) TypeDefinition(ctx context.Context, params *TypeDefinitionParams) (result []Location, err error)
- func (ls *LanguageServer) WillCreateFiles(ctx context.Context, params *CreateFilesParams) (result *WorkspaceEdit, err error)
- func (ls *LanguageServer) WillDeleteFiles(ctx context.Context, params *DeleteFilesParams) (result *WorkspaceEdit, err error)
- func (ls *LanguageServer) WillRenameFiles(ctx context.Context, params *RenameFilesParams) (result *WorkspaceEdit, err error)
- func (ls *LanguageServer) WillSave(ctx context.Context, params *WillSaveTextDocumentParams) (err error)
- func (ls *LanguageServer) WillSaveWaitUntil(ctx context.Context, params *WillSaveTextDocumentParams) (result []TextEdit, err error)
- func (ls *LanguageServer) WorkDoneProgressCancel(ctx context.Context, params *WorkDoneProgressCancelParams) (err error)
- type Mutexed
- type ServerState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CmpPositions ¶
func CmpPositions(a, b Position) int
CmpPositions compares two positions and returns:
-1 if a < b 0 if a == b 1 if a > b
func FromContext ¶
FromContext extracts *zap.Logger from a given context.Context and returns it.
Types ¶
type LanguageServer ¶
type LanguageServer struct {
// contains filtered or unexported fields
}
func (*LanguageServer) CodeAction ¶
func (ls *LanguageServer) CodeAction(ctx context.Context, params *CodeActionParams) (result []CodeAction, err error)
func (*LanguageServer) CodeLens ¶
func (ls *LanguageServer) CodeLens(ctx context.Context, params *CodeLensParams) (result []CodeLens, err error)
func (*LanguageServer) CodeLensRefresh ¶
func (ls *LanguageServer) CodeLensRefresh(ctx context.Context) (err error)
func (*LanguageServer) CodeLensResolve ¶
func (ls *LanguageServer) CodeLensResolve(ctx context.Context, params *CodeLens) (result *CodeLens, err error)
func (*LanguageServer) ColorPresentation ¶
func (ls *LanguageServer) ColorPresentation(ctx context.Context, params *ColorPresentationParams) (result []ColorPresentation, err error)
func (*LanguageServer) Completion ¶
func (ls *LanguageServer) Completion(ctx context.Context, params *CompletionParams) (result *CompletionList, err error)
func (*LanguageServer) CompletionResolve ¶
func (ls *LanguageServer) CompletionResolve(ctx context.Context, params *CompletionItem) (result *CompletionItem, err error)
func (*LanguageServer) Declaration ¶
func (ls *LanguageServer) Declaration(ctx context.Context, params *DeclarationParams) (result []Location, err error)
func (*LanguageServer) Definition ¶
func (ls *LanguageServer) Definition(ctx context.Context, params *DefinitionParams) (result []Location, err error)
func (*LanguageServer) DidChange ¶
func (ls *LanguageServer) DidChange(ctx context.Context, params *DidChangeTextDocumentParams) (err error)
func (*LanguageServer) DidChangeConfiguration ¶
func (ls *LanguageServer) DidChangeConfiguration(ctx context.Context, params *DidChangeConfigurationParams) (err error)
func (*LanguageServer) DidChangeWatchedFiles ¶
func (ls *LanguageServer) DidChangeWatchedFiles(ctx context.Context, params *DidChangeWatchedFilesParams) (err error)
func (*LanguageServer) DidChangeWorkspaceFolders ¶
func (ls *LanguageServer) DidChangeWorkspaceFolders(ctx context.Context, params *DidChangeWorkspaceFoldersParams) (err error)
func (*LanguageServer) DidClose ¶
func (ls *LanguageServer) DidClose(ctx context.Context, params *DidCloseTextDocumentParams) (err error)
func (*LanguageServer) DidCreateFiles ¶
func (ls *LanguageServer) DidCreateFiles(ctx context.Context, params *CreateFilesParams) (err error)
func (*LanguageServer) DidDeleteFiles ¶
func (ls *LanguageServer) DidDeleteFiles(ctx context.Context, params *DeleteFilesParams) (err error)
func (*LanguageServer) DidOpen ¶
func (ls *LanguageServer) DidOpen(ctx context.Context, params *DidOpenTextDocumentParams) (err error)
func (*LanguageServer) DidRenameFiles ¶
func (ls *LanguageServer) DidRenameFiles(ctx context.Context, params *RenameFilesParams) (err error)
func (*LanguageServer) DidSave ¶
func (ls *LanguageServer) DidSave(ctx context.Context, params *DidSaveTextDocumentParams) (err error)
func (*LanguageServer) DocumentColor ¶
func (ls *LanguageServer) DocumentColor(ctx context.Context, params *DocumentColorParams) (result []ColorInformation, err error)
func (*LanguageServer) DocumentHighlight ¶
func (ls *LanguageServer) DocumentHighlight(ctx context.Context, params *DocumentHighlightParams) (result []DocumentHighlight, err error)
func (*LanguageServer) DocumentLink ¶
func (ls *LanguageServer) DocumentLink(ctx context.Context, params *DocumentLinkParams) (result []DocumentLink, err error)
func (*LanguageServer) DocumentLinkResolve ¶
func (ls *LanguageServer) DocumentLinkResolve(ctx context.Context, params *DocumentLink) (result *DocumentLink, err error)
func (*LanguageServer) DocumentSymbol ¶
func (ls *LanguageServer) DocumentSymbol(ctx context.Context, params *DocumentSymbolParams) (result []any, err error)
func (*LanguageServer) ExecuteCommand ¶
func (ls *LanguageServer) ExecuteCommand(ctx context.Context, params *ExecuteCommandParams) (result interface{}, err error)
func (*LanguageServer) FoldingRanges ¶
func (ls *LanguageServer) FoldingRanges(ctx context.Context, params *FoldingRangeParams) (result []FoldingRange, err error)
func (*LanguageServer) Formatting ¶
func (ls *LanguageServer) Formatting(ctx context.Context, params *DocumentFormattingParams) (result []TextEdit, err error)
func (*LanguageServer) Hover ¶
func (ls *LanguageServer) Hover(ctx context.Context, params *HoverParams) (result *Hover, err error)
func (*LanguageServer) Implementation ¶
func (ls *LanguageServer) Implementation(ctx context.Context, params *ImplementationParams) (result []Location, err error)
func (*LanguageServer) IncomingCalls ¶
func (ls *LanguageServer) IncomingCalls(ctx context.Context, params *CallHierarchyIncomingCallsParams) (result []CallHierarchyIncomingCall, err error)
func (*LanguageServer) Initialize ¶
func (ls *LanguageServer) Initialize(ctx context.Context, params *InitializeParams) (result *InitializeResult, err error)
func (*LanguageServer) Initialized ¶
func (ls *LanguageServer) Initialized(ctx context.Context, params *InitializedParams) (err error)
func (*LanguageServer) LinkedEditingRange ¶
func (ls *LanguageServer) LinkedEditingRange(ctx context.Context, params *LinkedEditingRangeParams) (result *LinkedEditingRanges, err error)
func (*LanguageServer) Location ¶
func (ls *LanguageServer) Location(fset *token.FileSet, node ast.Node) Location
func (*LanguageServer) LogTrace ¶
func (ls *LanguageServer) LogTrace(ctx context.Context, params *LogTraceParams) (err error)
func (*LanguageServer) Moniker ¶
func (ls *LanguageServer) Moniker(ctx context.Context, params *MonikerParams) (result []Moniker, err error)
func (*LanguageServer) OnTypeFormatting ¶
func (ls *LanguageServer) OnTypeFormatting(ctx context.Context, params *DocumentOnTypeFormattingParams) (result []TextEdit, err error)
func (*LanguageServer) OutgoingCalls ¶
func (ls *LanguageServer) OutgoingCalls(ctx context.Context, params *CallHierarchyOutgoingCallsParams) (result []CallHierarchyOutgoingCall, err error)
func (*LanguageServer) PrepareCallHierarchy ¶
func (ls *LanguageServer) PrepareCallHierarchy(ctx context.Context, params *CallHierarchyPrepareParams) (result []CallHierarchyItem, err error)
func (*LanguageServer) PrepareRename ¶
func (ls *LanguageServer) PrepareRename(ctx context.Context, params *PrepareRenameParams) (result *Range, err error)
func (*LanguageServer) Range ¶
func (ls *LanguageServer) Range(fset *token.FileSet, node ast.Node) Range
func (*LanguageServer) RangeFormatting ¶
func (ls *LanguageServer) RangeFormatting(ctx context.Context, params *DocumentRangeFormattingParams) (result []TextEdit, err error)
func (*LanguageServer) References ¶
func (ls *LanguageServer) References(ctx context.Context, params *ReferenceParams) (result []Location, err error)
func (*LanguageServer) Rename ¶
func (ls *LanguageServer) Rename(ctx context.Context, params *RenameParams) (result *WorkspaceEdit, err error)
func (*LanguageServer) Request ¶
func (ls *LanguageServer) Request(ctx context.Context, method string, params interface{}) (result interface{}, err error)
func (*LanguageServer) SemanticTokensFull ¶
func (ls *LanguageServer) SemanticTokensFull(ctx context.Context, params *SemanticTokensParams) (result *SemanticTokens, err error)
func (*LanguageServer) SemanticTokensFullDelta ¶
func (ls *LanguageServer) SemanticTokensFullDelta(ctx context.Context, params *SemanticTokensDeltaParams) (result interface{}, err error)
func (*LanguageServer) SemanticTokensRange ¶
func (ls *LanguageServer) SemanticTokensRange(ctx context.Context, params *SemanticTokensRangeParams) (result *SemanticTokens, err error)
func (*LanguageServer) SemanticTokensRefresh ¶
func (ls *LanguageServer) SemanticTokensRefresh(ctx context.Context) (err error)
func (*LanguageServer) SetTrace ¶
func (ls *LanguageServer) SetTrace(ctx context.Context, params *SetTraceParams) (err error)
func (*LanguageServer) ShowDocument ¶
func (ls *LanguageServer) ShowDocument(ctx context.Context, params *ShowDocumentParams) (result *ShowDocumentResult, err error)
func (*LanguageServer) Shutdown ¶
func (ls *LanguageServer) Shutdown(ctx context.Context) (err error)
func (*LanguageServer) SignatureHelp ¶
func (ls *LanguageServer) SignatureHelp(ctx context.Context, params *SignatureHelpParams) (result *SignatureHelp, err error)
func (*LanguageServer) Symbols ¶
func (ls *LanguageServer) Symbols(ctx context.Context, params *WorkspaceSymbolParams) (result []SymbolInformation, err error)
func (*LanguageServer) TypeDefinition ¶
func (ls *LanguageServer) TypeDefinition(ctx context.Context, params *TypeDefinitionParams) (result []Location, err error)
func (*LanguageServer) WillCreateFiles ¶
func (ls *LanguageServer) WillCreateFiles(ctx context.Context, params *CreateFilesParams) (result *WorkspaceEdit, err error)
func (*LanguageServer) WillDeleteFiles ¶
func (ls *LanguageServer) WillDeleteFiles(ctx context.Context, params *DeleteFilesParams) (result *WorkspaceEdit, err error)
func (*LanguageServer) WillRenameFiles ¶
func (ls *LanguageServer) WillRenameFiles(ctx context.Context, params *RenameFilesParams) (result *WorkspaceEdit, err error)
func (*LanguageServer) WillSave ¶
func (ls *LanguageServer) WillSave(ctx context.Context, params *WillSaveTextDocumentParams) (err error)
func (*LanguageServer) WillSaveWaitUntil ¶
func (ls *LanguageServer) WillSaveWaitUntil(ctx context.Context, params *WillSaveTextDocumentParams) (result []TextEdit, err error)
func (*LanguageServer) WorkDoneProgressCancel ¶
func (ls *LanguageServer) WorkDoneProgressCancel(ctx context.Context, params *WorkDoneProgressCancelParams) (err error)
type ServerState ¶
type ServerState int
const ( ServerStateIdle ServerState = iota ServerStateRunning ServerStateShuttingDown ServerStateStopped )
Click to show internal directories.
Click to hide internal directories.