handler

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

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 holds references to shared server state.

func New

func New(store *document.Store) *Handler

New creates a Handler backed by the given document store.

func (*Handler) Analyze

func (h *Handler) Analyze(ctx *glsp.Context, uri, content string)

Analyze parses and analyzes content, then publishes diagnostics for uri.

func (*Handler) Completion

func (h *Handler) Completion(ctx *glsp.Context, params *protocol.CompletionParams) (any, error)

Completion handles textDocument/completion.

func (*Handler) CreateServerCapabilities

func (h *Handler) CreateServerCapabilities() protocol.ServerCapabilities

CreateServerCapabilities returns the capabilities advertised to the client.

func (*Handler) DidChange

func (h *Handler) DidChange(ctx *glsp.Context, params *protocol.DidChangeTextDocumentParams) error

DidChange handles textDocument/didChange (full sync).

func (*Handler) DidClose

func (h *Handler) DidClose(ctx *glsp.Context, params *protocol.DidCloseTextDocumentParams) error

DidClose handles textDocument/didClose.

func (*Handler) DidOpen

func (h *Handler) DidOpen(ctx *glsp.Context, params *protocol.DidOpenTextDocumentParams) error

DidOpen handles textDocument/didOpen.

func (*Handler) DidSave

func (h *Handler) DidSave(ctx *glsp.Context, params *protocol.DidSaveTextDocumentParams) error

DidSave handles textDocument/didSave.

func (*Handler) Hover

func (h *Handler) Hover(ctx *glsp.Context, params *protocol.HoverParams) (*protocol.Hover, error)

Hover handles textDocument/hover.

func (*Handler) Initialize

func (h *Handler) Initialize(ctx *glsp.Context, params *protocol.InitializeParams) (any, error)

Initialize handles the LSP initialize request and returns server capabilities.

func (*Handler) Initialized

func (h *Handler) Initialized(ctx *glsp.Context, params *protocol.InitializedParams) error

Initialized is called after the client acknowledges initialize.

func (*Handler) SetTrace

func (h *Handler) SetTrace(ctx *glsp.Context, params *protocol.SetTraceParams) error

SetTrace updates the trace level (no-op for now).

func (*Handler) Shutdown

func (h *Handler) Shutdown(ctx *glsp.Context) error

Shutdown gracefully shuts the server down.

Jump to

Keyboard shortcuts

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