types

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package types contains the Language Server Protocol specification types. See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InitializeParams

type InitializeParams struct {
	ClientInfo struct {
		Name    string `json:"name"`
		Version string `json:"version"`
	} `json:"clientInfo"`
}

https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#initializeParams.

type InitializeResult

type InitializeResult struct {
	Capabilities ServerCapabilities `json:"capabilities"`
	ServerInfo   ServerInfo         `json:"serverInfo"`
}

https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#initializeResult.

type Position

type Position struct {
	Line      int `json:"line"`
	Character int `json:"character"`
}

https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#position.

func (Position) String

func (p Position) String() string

type Range

type Range struct {
	Start Position `json:"start"`
	End   Position `json:"end"`
}

https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#range.

func (Range) String

func (r Range) String() string

type RequestID

type RequestID struct {
	IntVal    int
	StringVal string
}

https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#requestMessage.

func (RequestID) MarshalJSON

func (r RequestID) MarshalJSON() ([]byte, error)

func (*RequestID) String

func (r *RequestID) String() string

func (*RequestID) UnmarshalJSON

func (r *RequestID) UnmarshalJSON(data []byte) error

type RequestMessage

type RequestMessage struct {
	JSONRPC string          `json:"jsonrpc"`
	ID      *RequestID      `json:"id"`
	Method  string          `json:"method"`
	Params  json.RawMessage `json:"params"`
}

https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#requestMessage.

type ResponseMessage

type ResponseMessage struct {
	JSONRPC string     `json:"jsonrpc"`
	ID      *RequestID `json:"id"`
	Result  any        `json:"result"`
}

https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#responseMessage.

type ServerCapabilities

type ServerCapabilities struct {
	TextDocumentSync   TextDocumentSyncOptions `json:"textDocumentSync"`
	DefinitionProvider bool                    `json:"definitionProvider,omitempty"`
	ReferencesProvider bool                    `json:"referencesProvider,omitempty"`
}

https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#serverCapabilities.

type TextDocumentContentChangeEvent

type TextDocumentContentChangeEvent struct {
	Text  string `json:"text"`
	Range *Range `json:"range,omitempty"`
}

https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocumentContentChangeEvent.

type TextDocumentSyncOptions

type TextDocumentSyncOptions struct {
	OpenClose bool                 `json:"openClose,omitempty"`
	Change    TextDocumentSyncKind `json:"change"`
}

https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocumentSyncOptions.

Jump to

Keyboard shortcuts

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