window

package
v0.43.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Window

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

Window provides convenience methods for sending window-related notifications and requests to the client. Errors are logged using the provided logger but they are *not* returned, as there is typically nothing meaningful the server can do with them other than to log them, and handling them clutter the call sites.

func New

func New(conn *jsonrpc2.Conn, log *log.Logger) *Window

func (*Window) ShowDocument

func (w *Window) ShowDocument(ctx context.Context, uri string, takeFocus bool) bool

ShowDocument attempts to open the given URI in the user's editor.

func (*Window) ShowMessage

func (w *Window) ShowMessage(ctx context.Context, typ types.Message, msg string)

ShowMessage sends a message to be displayed in the user's editor.

func (*Window) ShowMessageRequest

func (w *Window) ShowMessageRequest(ctx context.Context, typ types.Message, msg string, actions ...string) string

ShowMessageRequest sends a message to be displayed in the user's editor, along with a set of actions for them to choose from. The returned string is the title of the action selected.

Jump to

Keyboard shortcuts

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