WindowFunctions

Utility functions for common LSP methods performing UI things.

Members

Functions

requestMessage
MessageActionItem requestMessage(MessageType type, string message, MessageActionItem[] actions)
string requestMessage(MessageType type, string message, string[] actions)

Runs window/showMessageRequest which typically shows a message box with possible action buttons to click. Returns the action which got clicked or one with null title if it has been dismissed.

runOrMessage
bool runOrMessage(void fn, MessageType type, string message, string file, size_t line)

Runs a function and shows a UI message on failure and logs the error.

showErrorMessage
void showErrorMessage(string message)

Calls showMessage with MessageType.error Also logs the message to stderr in a more readable way.

showInformationMessage
void showInformationMessage(string message)

Calls showMessage with MessageType.info Also logs the message to stderr in a more readable way.

showLogMessage
void showLogMessage(string message)

Calls showMessage with MessageType.log Also logs the message to stderr in a more readable way.

showMessage
void showMessage(MessageType type, string message)

Runs window/showMessage which typically shows a notification box, without any buttons or feedback. Logs the message to stderr too.

showWarningMessage
void showWarningMessage(string message)

Calls showMessage with MessageType.warning Also logs the message to stderr in a more readable way.

Variables

rpc
RPCProcessor rpc;

The RPC processor to use for sending/receiving

Meta