Documentation ¶
Overview ¶
Package proxy implements the protocol between acme-lsp and L commands.
Index ¶
Constants ¶
View Source
const Debug = false
View Source
const Version = 1
Version is used to detect if acme-lsp and L are speaking the same protocol.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CancelParams ¶
type DocumentUri ¶
type DocumentUri = string
type ExecuteCommandOnDocumentParams ¶
type ExecuteCommandOnDocumentParams struct { TextDocument protocol.TextDocumentIdentifier ExecuteCommandParams protocol.ExecuteCommandParams }
type Server ¶
type Server interface { // Version returns the protocol version. Version(context.Context) (int, error) // WorkspaceFolders returns the workspace folders currently being managed by acme-lsp. // In LSP, this method is implemented by the client, but in our case acme-lsp is managing // the workspace folders, so this has to be implemented by the acme-lsp proxy server. WorkspaceFolders(context.Context) ([]protocol.WorkspaceFolder, error) // InitializeResult returns the initialize response from the LSP server. // This is useful for L command to get initialization results (e.g. server capabilities) // of an already initialized LSP server. InitializeResult(context.Context, *protocol.TextDocumentIdentifier) (*protocol.InitializeResult, error) // ExecuteCommandOnDocument is the same as ExecuteCommand, but // params contain the TextDocumentIdentifier of the original // CodeAction so that the server implemention can multiplex // ExecuteCommand request to the right server. ExecuteCommandOnDocument(context.Context, *ExecuteCommandOnDocumentParams) (interface{}, error) DidChange(context.Context, *protocol.DidChangeTextDocumentParams) error DidChangeWorkspaceFolders(context.Context, *protocol.DidChangeWorkspaceFoldersParams) error Completion(context.Context, *protocol.CompletionParams) (*protocol.CompletionList, error) Definition(context.Context, *protocol.DefinitionParams) ([]protocol.Location, error) Formatting(context.Context, *protocol.DocumentFormattingParams) ([]protocol.TextEdit, error) CodeAction(context.Context, *protocol.CodeActionParams) ([]protocol.CodeAction, error) Hover(context.Context, *protocol.HoverParams) (*protocol.Hover, error) Implementation(context.Context, *protocol.ImplementationParams) ([]protocol.Location, error) References(context.Context, *protocol.ReferenceParams) ([]protocol.Location, error) Rename(context.Context, *protocol.RenameParams) (*protocol.WorkspaceEdit, error) SignatureHelp(context.Context, *protocol.SignatureHelpParams) (*protocol.SignatureHelp, error) DocumentSymbol(context.Context, *protocol.DocumentSymbolParams) ([]protocol.DocumentSymbol, error) TypeDefinition(context.Context, *protocol.TypeDefinitionParams) ([]protocol.Location, error) }
Server implements a subset of an LSP protocol server as defined by protocol.Server and some custom acme-lsp specific methods.
Click to show internal directories.
Click to hide internal directories.