lsp

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client represents an LSP client connection.

func (*Client) Notify

func (c *Client) Notify(method string, params interface{})

Notify sends a notification (no response expected).

func (*Client) Request

func (c *Client) Request(method string, params interface{}) (*Response, error)

Request sends a request to an LSP server.

type Request

type Request struct {
	JSONRPC string      `json:"jsonrpc"`
	ID      int         `json:"id"`
	Method  string      `json:"method"`
	Params  interface{} `json:"params,omitempty"`
}

Request is an LSP request.

type Response

type Response struct {
	JSONRPC string          `json:"jsonrpc"`
	ID      int             `json:"id,omitempty"`
	Method  string          `json:"method,omitempty"`
	Result  json.RawMessage `json:"result,omitempty"`
	Error   *ResponseError  `json:"error,omitempty"`
}

Response is an LSP response.

type ResponseError

type ResponseError struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

ResponseError is an LSP error.

type ServerManager

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

ServerManager manages LSP server connections.

func NewServerManager

func NewServerManager() *ServerManager

NewServerManager creates a new LSP server manager.

func (*ServerManager) IsRunning

func (m *ServerManager) IsRunning(name string) bool

IsRunning checks if a server is running.

func (*ServerManager) List

func (m *ServerManager) List() []string

List returns all running servers.

func (*ServerManager) Start

func (m *ServerManager) Start(name, command string, args ...string) error

Start starts an LSP server.

func (*ServerManager) Stop

func (m *ServerManager) Stop(name string) error

Stop stops an LSP server gracefully.

Jump to

Keyboard shortcuts

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