handlers

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2025 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SupportsSnippets = false // set according to the client capabilities

)

Functions

func CreateAstRequestHandler added in v1.0.0

func CreateAstRequestHandler(dm *documents.DocumentManager) protocol.CustomRequestFunc

func CreateTextDocumentDidChange

func CreateTextDocumentDidChange(dm *documents.DocumentManager, sendDiagnostics DiagnosticSender) protocol.TextDocumentDidChangeFunc

func CreateTextDocumentDidOpen

func CreateTextDocumentDidOpen(dm *documents.DocumentManager, sendDiagnostics DiagnosticSender) protocol.TextDocumentDidOpenFunc

func CreateTextDocumentDocumentHighlight added in v0.3.0

func CreateTextDocumentDocumentHighlight(dm *documents.DocumentManager) protocol.TextDocumentDocumentHighlightFunc

func CreateTextDocumentPrepareRename added in v0.3.0

func CreateTextDocumentPrepareRename(dm *documents.DocumentManager) protocol.TextDocumentPrepareRenameFunc

func CreateTextDocumentRename added in v0.3.0

func CreateTextDocumentRename(dm *documents.DocumentManager) protocol.TextDocumentRenameFunc

func RecoverAnyErr added in v0.4.0

func RecoverAnyErr[T, R any](handler func(*glsp.Context, T) (R, error)) func(*glsp.Context, T) (R, error)

func RecoverErr added in v0.4.0

func RecoverErr[T any](handler func(*glsp.Context, T) error) func(*glsp.Context, T) error

Types

type AstRequest added in v1.0.0

type AstRequest struct {
	Path  string          `json:"path"`
	Range *protocol.Range `json:"range"`
}

type DiagnosticSender

type DiagnosticSender func(*documents.DocumentManager, glsp.NotifyFunc, string, bool)

func CreateSendDiagnostics

func CreateSendDiagnostics(ctx context.Context) DiagnosticSender

type TreeItem added in v1.0.0

type TreeItem struct {
	Label            string         `json:"label"`
	Children         []TreeItem     `json:"children"`
	CollapsibleState int            `json:"collapsibleState"`
	Description      string         `json:"description"`
	IconId           string         `json:"iconId"`
	Range            protocol.Range `json:"range"`
}

func NewDataItem added in v1.0.0

func NewDataItem(label string, data string, children []TreeItem) TreeItem

func NewNodeItem added in v1.0.0

func NewNodeItem(node ast.Node, description string, children []TreeItem, iconID string) TreeItem

Jump to

Keyboard shortcuts

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