lsp

package
v0.0.0-...-5af948b Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package lsp implements a JSON-RPC 2.0 server handler which implements the Language Server Protocol.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

Handler handles JSON-RPC requests and notifications.

func NewHandler

func NewHandler() *Handler

NewHandler returns a new Handler.

func (*Handler) HandleNotification

func (h *Handler) HandleNotification(method string, jsonParams *json.RawMessage)

HandleNotification responds to a JSON-RPC notification.

func (*Handler) HandleRequest

func (h *Handler) HandleRequest(method string, jsonParams *json.RawMessage) (any, error)

HandleRequest responds to a JSON-RPC request.

func (*Handler) SetClient

func (h *Handler) SetClient(client *jsonrpc.Client)

SetClient sets the client that the handler can use to send requests and notifications to the server's client.

Directories

Path Synopsis
Package protocol contains the types required to implement handlers for the LSP methods that loxls supports.
Package protocol contains the types required to implement handlers for the LSP methods that loxls supports.
typegen
Entry point for typegen.
Entry point for typegen.
typegen/generate
Package generate provides a function to generate Go source code for LSP types.
Package generate provides a function to generate Go source code for LSP types.
typegen/metamodel
Package metamodel contains the types that make up the LSP meta model and a function to load the meta model from Microsoft's website.
Package metamodel contains the types that make up the LSP meta model and a function to load the meta model from Microsoft's website.

Jump to

Keyboard shortcuts

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