Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallFunc ¶
CallFunc is a signature for a function that sends JSON-RPC requests. The result parameter should be a pointer to the value that the result should be unmarshaled into. This should only be used directly in the case where lsp.Dispatcher doesn't implement the method you need to call.
type Handler ¶
type Handler interface {
Handle(ctx *LSPContext) (r any, validMethod bool, validParams bool, err error)
}
Handler provides an interface for handling LSP requests.
type HandlerFunc ¶
type HandlerFunc func(ctx *LSPContext) (r any, validMethod bool, validParams bool, err error)
HandlerFunc provides a convenient way to define a handler with a plain function.
func (HandlerFunc) Handle ¶
func (f HandlerFunc) Handle(ctx *LSPContext) (r any, validMethod bool, validParams bool, err error)
type LSPContext ¶
type LSPContext struct {
Method string
Params json.RawMessage
Notify NotifyFunc
Call CallFunc
Context context.Context
}
LSPContext contains the context for an LSP request from a client.
type NotifyFunc ¶
NotifyFunc is a signature for a function that sends JSON-RPC notifications. This should only be used directly in the case where lsp.Dispatcher doesn't implement the method you need to call.