Documentation
¶
Index ¶
- Variables
- type FallbackServer
- func (f FallbackServer) CodeAction(_ context.Context, _ *protocol.CodeActionParams) (result []protocol.CodeAction, err error)
- func (f FallbackServer) CodeLens(_ context.Context, _ *protocol.CodeLensParams) (result []protocol.CodeLens, err error)
- func (f FallbackServer) CodeLensRefresh(_ context.Context) (err error)
- func (f FallbackServer) CodeLensResolve(_ context.Context, _ *protocol.CodeLens) (result *protocol.CodeLens, err error)
- func (f FallbackServer) ColorPresentation(_ context.Context, _ *protocol.ColorPresentationParams) (result []protocol.ColorPresentation, err error)
- func (f FallbackServer) Completion(_ context.Context, _ *protocol.CompletionParams) (result *protocol.CompletionList, err error)
- func (f FallbackServer) CompletionResolve(_ context.Context, _ *protocol.CompletionItem) (result *protocol.CompletionItem, err error)
- func (f FallbackServer) Declaration(_ context.Context, _ *protocol.DeclarationParams) (result []protocol.Location, err error)
- func (f FallbackServer) Definition(_ context.Context, _ *protocol.DefinitionParams) (result []protocol.Location, err error)
- func (f FallbackServer) DidChange(_ context.Context, _ *protocol.DidChangeTextDocumentParams) (err error)
- func (f FallbackServer) DidChangeConfiguration(_ context.Context, _ *protocol.DidChangeConfigurationParams) (err error)
- func (f FallbackServer) DidChangeWatchedFiles(_ context.Context, _ *protocol.DidChangeWatchedFilesParams) (err error)
- func (f FallbackServer) DidChangeWorkspaceFolders(_ context.Context, _ *protocol.DidChangeWorkspaceFoldersParams) (err error)
- func (f FallbackServer) DidClose(_ context.Context, _ *protocol.DidCloseTextDocumentParams) (err error)
- func (f FallbackServer) DidCreateFiles(_ context.Context, _ *protocol.CreateFilesParams) (err error)
- func (f FallbackServer) DidDeleteFiles(_ context.Context, _ *protocol.DeleteFilesParams) (err error)
- func (f FallbackServer) DidOpen(_ context.Context, _ *protocol.DidOpenTextDocumentParams) (err error)
- func (f FallbackServer) DidRenameFiles(_ context.Context, _ *protocol.RenameFilesParams) (err error)
- func (f FallbackServer) DidSave(_ context.Context, _ *protocol.DidSaveTextDocumentParams) (err error)
- func (f FallbackServer) DocumentColor(_ context.Context, _ *protocol.DocumentColorParams) (result []protocol.ColorInformation, err error)
- func (f FallbackServer) DocumentHighlight(_ context.Context, _ *protocol.DocumentHighlightParams) (result []protocol.DocumentHighlight, err error)
- func (f FallbackServer) DocumentLink(_ context.Context, _ *protocol.DocumentLinkParams) (result []protocol.DocumentLink, err error)
- func (f FallbackServer) DocumentLinkResolve(_ context.Context, _ *protocol.DocumentLink) (result *protocol.DocumentLink, err error)
- func (f FallbackServer) DocumentSymbol(_ context.Context, _ *protocol.DocumentSymbolParams) (result []interface{}, err error)
- func (f FallbackServer) ExecuteCommand(_ context.Context, _ *protocol.ExecuteCommandParams) (result interface{}, err error)
- func (f FallbackServer) Exit(_ context.Context) (err error)
- func (f FallbackServer) FoldingRanges(_ context.Context, _ *protocol.FoldingRangeParams) (result []protocol.FoldingRange, err error)
- func (f FallbackServer) Formatting(_ context.Context, _ *protocol.DocumentFormattingParams) (result []protocol.TextEdit, err error)
- func (f FallbackServer) Hover(_ context.Context, _ *protocol.HoverParams) (result *protocol.Hover, err error)
- func (f FallbackServer) Implementation(_ context.Context, _ *protocol.ImplementationParams) (result []protocol.Location, err error)
- func (f FallbackServer) IncomingCalls(_ context.Context, _ *protocol.CallHierarchyIncomingCallsParams) (result []protocol.CallHierarchyIncomingCall, err error)
- func (f FallbackServer) Initialize(_ context.Context, _ *protocol.InitializeParams) (result *protocol.InitializeResult, err error)
- func (f FallbackServer) Initialized(_ context.Context, _ *protocol.InitializedParams) (err error)
- func (f FallbackServer) LinkedEditingRange(_ context.Context, _ *protocol.LinkedEditingRangeParams) (result *protocol.LinkedEditingRanges, err error)
- func (f FallbackServer) LogTrace(_ context.Context, _ *protocol.LogTraceParams) (err error)
- func (f FallbackServer) Moniker(_ context.Context, _ *protocol.MonikerParams) (result []protocol.Moniker, err error)
- func (f FallbackServer) OnTypeFormatting(_ context.Context, _ *protocol.DocumentOnTypeFormattingParams) (result []protocol.TextEdit, err error)
- func (f FallbackServer) OutgoingCalls(_ context.Context, _ *protocol.CallHierarchyOutgoingCallsParams) (result []protocol.CallHierarchyOutgoingCall, err error)
- func (f FallbackServer) PrepareCallHierarchy(_ context.Context, _ *protocol.CallHierarchyPrepareParams) (result []protocol.CallHierarchyItem, err error)
- func (f FallbackServer) PrepareRename(_ context.Context, _ *protocol.PrepareRenameParams) (result *protocol.Range, err error)
- func (f FallbackServer) RangeFormatting(_ context.Context, _ *protocol.DocumentRangeFormattingParams) (result []protocol.TextEdit, err error)
- func (f FallbackServer) References(_ context.Context, _ *protocol.ReferenceParams) (result []protocol.Location, err error)
- func (f FallbackServer) Rename(_ context.Context, _ *protocol.RenameParams) (result *protocol.WorkspaceEdit, err error)
- func (f FallbackServer) Request(_ context.Context, _ string, _ interface{}) (result interface{}, err error)
- func (f FallbackServer) SemanticTokensFull(_ context.Context, _ *protocol.SemanticTokensParams) (result *protocol.SemanticTokens, err error)
- func (f FallbackServer) SemanticTokensFullDelta(_ context.Context, _ *protocol.SemanticTokensDeltaParams) (result interface{}, err error)
- func (f FallbackServer) SemanticTokensRange(_ context.Context, _ *protocol.SemanticTokensRangeParams) (result *protocol.SemanticTokens, err error)
- func (f FallbackServer) SemanticTokensRefresh(_ context.Context) (err error)
- func (f FallbackServer) SetTrace(_ context.Context, _ *protocol.SetTraceParams) (err error)
- func (f FallbackServer) ShowDocument(_ context.Context, _ *protocol.ShowDocumentParams) (result *protocol.ShowDocumentResult, err error)
- func (f FallbackServer) Shutdown(_ context.Context) (err error)
- func (f FallbackServer) SignatureHelp(_ context.Context, _ *protocol.SignatureHelpParams) (result *protocol.SignatureHelp, err error)
- func (f FallbackServer) Symbols(_ context.Context, _ *protocol.WorkspaceSymbolParams) (result []protocol.SymbolInformation, err error)
- func (f FallbackServer) TypeDefinition(_ context.Context, _ *protocol.TypeDefinitionParams) (result []protocol.Location, err error)
- func (f FallbackServer) WillCreateFiles(_ context.Context, _ *protocol.CreateFilesParams) (result *protocol.WorkspaceEdit, err error)
- func (f FallbackServer) WillDeleteFiles(_ context.Context, _ *protocol.DeleteFilesParams) (result *protocol.WorkspaceEdit, err error)
- func (f FallbackServer) WillRenameFiles(_ context.Context, _ *protocol.RenameFilesParams) (result *protocol.WorkspaceEdit, err error)
- func (f FallbackServer) WillSave(_ context.Context, _ *protocol.WillSaveTextDocumentParams) (err error)
- func (f FallbackServer) WillSaveWaitUntil(_ context.Context, _ *protocol.WillSaveTextDocumentParams) (result []protocol.TextEdit, err error)
- func (f FallbackServer) WorkDoneProgressCancel(_ context.Context, _ *protocol.WorkDoneProgressCancelParams) (err error)
- type Server
- func (s *Server) Completion(ctx context.Context, params *protocol.CompletionParams) (*protocol.CompletionList, error)
- func (s Server) Definition(ctx context.Context, params *protocol.DefinitionParams) (result []protocol.Location, err error)
- func (s *Server) DidChange(ctx context.Context, params *protocol.DidChangeTextDocumentParams) (err error)
- func (s *Server) DidClose(_ context.Context, params *protocol.DidCloseTextDocumentParams) (err error)
- func (s *Server) DidOpen(ctx context.Context, params *protocol.DidOpenTextDocumentParams) (err error)
- func (s *Server) DidSave(ctx context.Context, params *protocol.DidSaveTextDocumentParams) (err error)
- func (s *Server) DocumentSymbol(ctx context.Context, params *protocol.DocumentSymbolParams) ([]interface{}, error)
- func (s *Server) Exit(ctx context.Context) (err error)
- func (s *Server) Handler(middlewares ...middleware.Middleware) jsonrpc2.Handler
- func (s *Server) Hover(ctx context.Context, params *protocol.HoverParams) (result *protocol.Hover, err error)
- func (s *Server) Initialize(ctx context.Context, params *protocol.InitializeParams) (result *protocol.InitializeResult, err error)
- func (s *Server) Shutdown(ctx context.Context) (err error)
- func (s *Server) SignatureHelp(ctx context.Context, params *protocol.SignatureHelpParams) (*protocol.SignatureHelp, error)
Constants ¶
This section is empty.
Variables ¶
var StandardMiddleware = []middleware.Middleware{ middleware.Recover, middleware.Error, protocol.CancelHandler, jsonrpc2.AsyncHandler, jsonrpc2.ReplyHandler, }
Functions ¶
This section is empty.
Types ¶
type FallbackServer ¶
type FallbackServer struct{}
FallbackServer is a complete implementation of the protocol.Server interface that responds with a "method not found" error for all methods.
LSP provides a rich capabilities system, so servers don't need to implement all functionality. However, the protocol.Server interface contains ALL possible methods yet is desirable to use because a jsonrpc2.Handler wrapper is provided which handles repetitive logic like (un)marshaling.
FallbackServer is intended to be embedded within a real server struct implementation, which can then override methods as needed. This is purely for convenience and to make the code easier to browse, as the numerous stub methods are not intermingled with actual functionality.
func (FallbackServer) CodeAction ¶
func (f FallbackServer) CodeAction(_ context.Context, _ *protocol.CodeActionParams) (result []protocol.CodeAction, err error)
func (FallbackServer) CodeLens ¶
func (f FallbackServer) CodeLens(_ context.Context, _ *protocol.CodeLensParams) (result []protocol.CodeLens, err error)
func (FallbackServer) CodeLensRefresh ¶
func (f FallbackServer) CodeLensRefresh(_ context.Context) (err error)
func (FallbackServer) CodeLensResolve ¶
func (FallbackServer) ColorPresentation ¶
func (f FallbackServer) ColorPresentation(_ context.Context, _ *protocol.ColorPresentationParams) (result []protocol.ColorPresentation, err error)
func (FallbackServer) Completion ¶
func (f FallbackServer) Completion(_ context.Context, _ *protocol.CompletionParams) (result *protocol.CompletionList, err error)
func (FallbackServer) CompletionResolve ¶
func (f FallbackServer) CompletionResolve(_ context.Context, _ *protocol.CompletionItem) (result *protocol.CompletionItem, err error)
func (FallbackServer) Declaration ¶
func (f FallbackServer) Declaration(_ context.Context, _ *protocol.DeclarationParams) (result []protocol.Location, err error)
func (FallbackServer) Definition ¶
func (f FallbackServer) Definition(_ context.Context, _ *protocol.DefinitionParams) (result []protocol.Location, err error)
func (FallbackServer) DidChange ¶
func (f FallbackServer) DidChange(_ context.Context, _ *protocol.DidChangeTextDocumentParams) (err error)
func (FallbackServer) DidChangeConfiguration ¶
func (f FallbackServer) DidChangeConfiguration(_ context.Context, _ *protocol.DidChangeConfigurationParams) (err error)
func (FallbackServer) DidChangeWatchedFiles ¶
func (f FallbackServer) DidChangeWatchedFiles(_ context.Context, _ *protocol.DidChangeWatchedFilesParams) (err error)
func (FallbackServer) DidChangeWorkspaceFolders ¶
func (f FallbackServer) DidChangeWorkspaceFolders(_ context.Context, _ *protocol.DidChangeWorkspaceFoldersParams) (err error)
func (FallbackServer) DidClose ¶
func (f FallbackServer) DidClose(_ context.Context, _ *protocol.DidCloseTextDocumentParams) (err error)
func (FallbackServer) DidCreateFiles ¶
func (f FallbackServer) DidCreateFiles(_ context.Context, _ *protocol.CreateFilesParams) (err error)
func (FallbackServer) DidDeleteFiles ¶
func (f FallbackServer) DidDeleteFiles(_ context.Context, _ *protocol.DeleteFilesParams) (err error)
func (FallbackServer) DidOpen ¶
func (f FallbackServer) DidOpen(_ context.Context, _ *protocol.DidOpenTextDocumentParams) (err error)
func (FallbackServer) DidRenameFiles ¶
func (f FallbackServer) DidRenameFiles(_ context.Context, _ *protocol.RenameFilesParams) (err error)
func (FallbackServer) DidSave ¶
func (f FallbackServer) DidSave(_ context.Context, _ *protocol.DidSaveTextDocumentParams) (err error)
func (FallbackServer) DocumentColor ¶
func (f FallbackServer) DocumentColor(_ context.Context, _ *protocol.DocumentColorParams) (result []protocol.ColorInformation, err error)
func (FallbackServer) DocumentHighlight ¶
func (f FallbackServer) DocumentHighlight(_ context.Context, _ *protocol.DocumentHighlightParams) (result []protocol.DocumentHighlight, err error)
func (FallbackServer) DocumentLink ¶
func (f FallbackServer) DocumentLink(_ context.Context, _ *protocol.DocumentLinkParams) (result []protocol.DocumentLink, err error)
func (FallbackServer) DocumentLinkResolve ¶
func (f FallbackServer) DocumentLinkResolve(_ context.Context, _ *protocol.DocumentLink) (result *protocol.DocumentLink, err error)
func (FallbackServer) DocumentSymbol ¶
func (f FallbackServer) DocumentSymbol(_ context.Context, _ *protocol.DocumentSymbolParams) (result []interface{}, err error)
func (FallbackServer) ExecuteCommand ¶
func (f FallbackServer) ExecuteCommand(_ context.Context, _ *protocol.ExecuteCommandParams) (result interface{}, err error)
func (FallbackServer) FoldingRanges ¶
func (f FallbackServer) FoldingRanges(_ context.Context, _ *protocol.FoldingRangeParams) (result []protocol.FoldingRange, err error)
func (FallbackServer) Formatting ¶
func (f FallbackServer) Formatting(_ context.Context, _ *protocol.DocumentFormattingParams) (result []protocol.TextEdit, err error)
func (FallbackServer) Hover ¶
func (f FallbackServer) Hover(_ context.Context, _ *protocol.HoverParams) (result *protocol.Hover, err error)
func (FallbackServer) Implementation ¶
func (f FallbackServer) Implementation(_ context.Context, _ *protocol.ImplementationParams) (result []protocol.Location, err error)
func (FallbackServer) IncomingCalls ¶
func (f FallbackServer) IncomingCalls(_ context.Context, _ *protocol.CallHierarchyIncomingCallsParams) (result []protocol.CallHierarchyIncomingCall, err error)
func (FallbackServer) Initialize ¶
func (f FallbackServer) Initialize(_ context.Context, _ *protocol.InitializeParams) (result *protocol.InitializeResult, err error)
func (FallbackServer) Initialized ¶
func (f FallbackServer) Initialized(_ context.Context, _ *protocol.InitializedParams) (err error)
func (FallbackServer) LinkedEditingRange ¶
func (f FallbackServer) LinkedEditingRange(_ context.Context, _ *protocol.LinkedEditingRangeParams) (result *protocol.LinkedEditingRanges, err error)
func (FallbackServer) LogTrace ¶
func (f FallbackServer) LogTrace(_ context.Context, _ *protocol.LogTraceParams) (err error)
func (FallbackServer) Moniker ¶
func (f FallbackServer) Moniker(_ context.Context, _ *protocol.MonikerParams) (result []protocol.Moniker, err error)
func (FallbackServer) OnTypeFormatting ¶
func (f FallbackServer) OnTypeFormatting(_ context.Context, _ *protocol.DocumentOnTypeFormattingParams) (result []protocol.TextEdit, err error)
func (FallbackServer) OutgoingCalls ¶
func (f FallbackServer) OutgoingCalls(_ context.Context, _ *protocol.CallHierarchyOutgoingCallsParams) (result []protocol.CallHierarchyOutgoingCall, err error)
func (FallbackServer) PrepareCallHierarchy ¶
func (f FallbackServer) PrepareCallHierarchy(_ context.Context, _ *protocol.CallHierarchyPrepareParams) (result []protocol.CallHierarchyItem, err error)
func (FallbackServer) PrepareRename ¶
func (f FallbackServer) PrepareRename(_ context.Context, _ *protocol.PrepareRenameParams) (result *protocol.Range, err error)
func (FallbackServer) RangeFormatting ¶
func (f FallbackServer) RangeFormatting(_ context.Context, _ *protocol.DocumentRangeFormattingParams) (result []protocol.TextEdit, err error)
func (FallbackServer) References ¶
func (f FallbackServer) References(_ context.Context, _ *protocol.ReferenceParams) (result []protocol.Location, err error)
func (FallbackServer) Rename ¶
func (f FallbackServer) Rename(_ context.Context, _ *protocol.RenameParams) (result *protocol.WorkspaceEdit, err error)
func (FallbackServer) Request ¶
func (f FallbackServer) Request(_ context.Context, _ string, _ interface{}) (result interface{}, err error)
func (FallbackServer) SemanticTokensFull ¶
func (f FallbackServer) SemanticTokensFull(_ context.Context, _ *protocol.SemanticTokensParams) (result *protocol.SemanticTokens, err error)
func (FallbackServer) SemanticTokensFullDelta ¶
func (f FallbackServer) SemanticTokensFullDelta(_ context.Context, _ *protocol.SemanticTokensDeltaParams) (result interface{}, err error)
func (FallbackServer) SemanticTokensRange ¶
func (f FallbackServer) SemanticTokensRange(_ context.Context, _ *protocol.SemanticTokensRangeParams) (result *protocol.SemanticTokens, err error)
func (FallbackServer) SemanticTokensRefresh ¶
func (f FallbackServer) SemanticTokensRefresh(_ context.Context) (err error)
func (FallbackServer) SetTrace ¶
func (f FallbackServer) SetTrace(_ context.Context, _ *protocol.SetTraceParams) (err error)
func (FallbackServer) ShowDocument ¶
func (f FallbackServer) ShowDocument(_ context.Context, _ *protocol.ShowDocumentParams) (result *protocol.ShowDocumentResult, err error)
func (FallbackServer) SignatureHelp ¶
func (f FallbackServer) SignatureHelp(_ context.Context, _ *protocol.SignatureHelpParams) (result *protocol.SignatureHelp, err error)
func (FallbackServer) Symbols ¶
func (f FallbackServer) Symbols(_ context.Context, _ *protocol.WorkspaceSymbolParams) (result []protocol.SymbolInformation, err error)
func (FallbackServer) TypeDefinition ¶
func (f FallbackServer) TypeDefinition(_ context.Context, _ *protocol.TypeDefinitionParams) (result []protocol.Location, err error)
func (FallbackServer) WillCreateFiles ¶
func (f FallbackServer) WillCreateFiles(_ context.Context, _ *protocol.CreateFilesParams) (result *protocol.WorkspaceEdit, err error)
func (FallbackServer) WillDeleteFiles ¶
func (f FallbackServer) WillDeleteFiles(_ context.Context, _ *protocol.DeleteFilesParams) (result *protocol.WorkspaceEdit, err error)
func (FallbackServer) WillRenameFiles ¶
func (f FallbackServer) WillRenameFiles(_ context.Context, _ *protocol.RenameFilesParams) (result *protocol.WorkspaceEdit, err error)
func (FallbackServer) WillSave ¶
func (f FallbackServer) WillSave(_ context.Context, _ *protocol.WillSaveTextDocumentParams) (err error)
func (FallbackServer) WillSaveWaitUntil ¶
func (f FallbackServer) WillSaveWaitUntil(_ context.Context, _ *protocol.WillSaveTextDocumentParams) (result []protocol.TextEdit, err error)
func (FallbackServer) WorkDoneProgressCancel ¶
func (f FallbackServer) WorkDoneProgressCancel(_ context.Context, _ *protocol.WorkDoneProgressCancelParams) (err error)
type Server ¶
type Server struct {
// FallbackServer stubs out protocol.Server, returning "not found" errors
// for all methods; overridden methods on this object provide real
// implementations
FallbackServer
// contains filtered or unexported fields
}
func (*Server) Completion ¶
func (s *Server) Completion(ctx context.Context, params *protocol.CompletionParams) (*protocol.CompletionList, error)
func (Server) Definition ¶
func (*Server) DocumentSymbol ¶
func (*Server) Handler ¶
func (s *Server) Handler(middlewares ...middleware.Middleware) jsonrpc2.Handler
func (*Server) Initialize ¶
func (s *Server) Initialize(ctx context.Context, params *protocol.InitializeParams) (result *protocol.InitializeResult, err error)
func (*Server) SignatureHelp ¶
func (s *Server) SignatureHelp(ctx context.Context, params *protocol.SignatureHelpParams) (*protocol.SignatureHelp, error)