Class

LspEditor

Description

class Lsp.Editor : Jsonrpc.Server
{
  /* No available fields */
}

A JSON-RPC server implementing the client side of the Language Server Protocol.

This API is intended for GUIs, which is why incoming LSP notifications have synchronous event handlers rather than virtual async methods.

Hierarchy

hierarchy this LspEditor ancestor_0 JsonrpcServer ancestor_0--this ancestor_1 GObject ancestor_1--ancestor_0

Constructors

lsp_editor_new
No description available.

Instance methods

lsp_editor_get_exited

Gets the value of exited.

lsp_editor_get_is_shutting_down

Gets the value of is_shutting_down.

lsp_editor_get_trace_value

Gets the value of trace_value.

lsp_editor_get_cancellable

Gets the value of cancellable.

lsp_editor_get_init_result

Gets the value of init_result.

lsp_editor_get_text_documents

Gets the value of text_documents.

lsp_editor_apply_workspace_edit_async

The workspace/applyEdit request is sent from the server to the client to apply a workspace edit.

lsp_editor_apply_workspace_edit_finish
No description available.

lsp_editor_show_message_request_async

Asks the user to select an action for a server-provided message.

lsp_editor_show_message_request_finish
No description available.

lsp_editor_show_document_async

Shows a server-provided resource in the editor.

lsp_editor_show_document_finish
No description available.

lsp_editor_initialize_async

Initializes the server, if we’re connected to one.

lsp_editor_initialize_finish
No description available.

lsp_editor_initialize_with_params_async

Initializes the server with caller-provided protocol parameters.

lsp_editor_initialize_with_params_finish
No description available.

lsp_editor_initialized_async

Notifies the server that initialization has completed.

lsp_editor_initialized_finish
No description available.

lsp_editor_open_text_document_async

Opens a file, sending the textDocument/didOpen message to the language server. If the file is already open, this does nothing.

lsp_editor_open_text_document_finish
No description available.

lsp_editor_edit_text_document_async

The document change notification is sent from the client to the server to signal changes to a text document. Before a client can change a text document it must claim ownership of its content using the textDocument/didOpen notification (see lsp_editor_open_text_document_async() ). In 2.0 the shape of the params has changed to include proper version numbers.

lsp_editor_edit_text_document_finish
No description available.

lsp_editor_save_text_document_async

Notifies the server that an open document was saved.

lsp_editor_save_text_document_finish
No description available.

lsp_editor_close_text_document_async

Closes a file, sending the textDocument/didClose message to the language server. If the file is not open, this does nothing.

lsp_editor_close_text_document_finish
No description available.

lsp_editor_set_trace_async

A notification that should be used by the client to modify the trace setting of the server.

lsp_editor_set_trace_finish
No description available.

lsp_editor_shutdown_async

Requests an orderly server shutdown without terminating it.

lsp_editor_shutdown_finish
No description available.

lsp_editor_exit_async

Notifies the server to exit after shutdown.

lsp_editor_exit_finish
No description available.

lsp_editor_completion_async

The completion request is sent from the client to the server to compute completion items at a given cursor position.

lsp_editor_completion_finish
No description available.

lsp_editor_document_highlight_async

The document highlight request is sent from the client to the server to resolve document highlights for a given text document position.

lsp_editor_document_highlight_finish
No description available.

lsp_editor_hover_async

The hover request is sent from the client to the server to request hover information at a given text document position.

lsp_editor_hover_finish
No description available.

lsp_editor_signature_help_async

The signature help request is sent from the client to the server to request signature information at a given cursor position.

lsp_editor_signature_help_finish
No description available.

lsp_editor_declaration_async

The go-to-declaration request is sent from the client to the server to resolve the declaration location for a symbol at a given text document position.

lsp_editor_declaration_finish
No description available.

lsp_editor_definition_async

The go-to-definition request is sent from the client to the server to resolve the definition location for a symbol at a given text document position.

lsp_editor_definition_finish
No description available.

lsp_editor_implementation_async

The go-to-implementation request is sent from the client to the server to resolve the implementation location for a symbol at a given text document position.

lsp_editor_implementation_finish
No description available.

lsp_editor_references_async

The references request is sent from the client to the server to resolve project-wide references for the symbol denoted by the given text document position.

lsp_editor_references_finish
No description available.

lsp_editor_document_symbol_async

The document symbol request is sent from the client to the server to return all symbols found in a given text document.

lsp_editor_document_symbol_finish
No description available.

lsp_editor_rename_async

The rename request is sent from the client to the server to rename a symbol.

lsp_editor_rename_finish
No description available.

lsp_editor_prepare_rename_async

The prepare rename request is sent from the client to the server to check whether a rename is valid at the given position.

lsp_editor_prepare_rename_finish
No description available.

lsp_editor_prepare_call_hierarchy_async

The prepare call hierarchy request is sent from the client to the server to prepare a call hierarchy for a symbol at a given text document position.

lsp_editor_prepare_call_hierarchy_finish
No description available.

lsp_editor_incoming_calls_async

The incoming calls request is sent from the client to the server to resolve incoming calls for a given call hierarchy item.

lsp_editor_incoming_calls_finish
No description available.

lsp_editor_outgoing_calls_async

The outgoing calls request is sent from the client to the server to resolve outgoing calls for a given call hierarchy item.

lsp_editor_outgoing_calls_finish
No description available.

lsp_editor_prepare_type_hierarchy_async

Prepares a type hierarchy at a document position.

lsp_editor_prepare_type_hierarchy_finish
No description available.

lsp_editor_type_hierarchy_supertypes_async

Resolves direct supertypes for a type hierarchy item.

lsp_editor_type_hierarchy_subtypes_async

Resolves direct subtypes for a type hierarchy item.

lsp_editor_type_hierarchy_subtypes_finish
No description available.

lsp_editor_inlay_hint_async

The inlay hint request is sent from the client to the server to resolve inlay hints for a given text document range.

lsp_editor_inlay_hint_finish
No description available.

lsp_editor_inlay_hint_resolve_async

The inlay hint resolve request is sent from the client to the server to resolve additional information for a given inlay hint.

lsp_editor_inlay_hint_resolve_finish
No description available.

lsp_editor_code_action_async

The code action request is sent from the client to the server to compute commands for a given text document and range. These commands are typically code fixes to either fix problems or to beautify/refactor code. The result of a textDocument/codeAction request is an array of Command literals which are typically presented in the user interface. To ensure that a server is useful in many clients the commands specified in a code actions should be handled by the server and not by the client (see workspace/executeCommand and ServerCapabilities.executeCommandProvider). If the client supports providing edits with a code action then that mode should be used.

lsp_editor_code_action_finish
No description available.

lsp_editor_code_lens_async

The code lens request is sent from the client to the server to compute code lenses for a given text document.

lsp_editor_code_lens_finish
No description available.

lsp_editor_formatting_async

The document formatting request is sent from the client to the server to format a whole document.

lsp_editor_formatting_finish
No description available.

lsp_editor_range_formatting_async

The document range formatting request is sent from the client to the server to format a given range in a document.

lsp_editor_range_formatting_finish
No description available.

lsp_editor_workspace_symbol_async

The workspace symbol request is sent from the client to the server to list project-wide symbols matching a given query string.

lsp_editor_workspace_symbol_finish
No description available.

Methods inherited from JsonrpcServer (4)
jsonrpc_server_accept_io_stream

This function accepts io_stream as a new client to the JsonrpcServer by wrapping it in a JsonrpcClient and starting the message accept loop.

jsonrpc_server_add_handler

Adds a new handler that will be dispatched when a matching method arrives.

jsonrpc_server_foreach

Calls foreach_func for every client connected.

jsonrpc_server_remove_handler

Removes a handler that was previously registered with jsonrpc_server_add_handler().

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Properties

Lsp.Editor:exited

Whether we’ve exited the server.

Lsp.Editor:is-shutting-down

Whether a successful shutdown request has been sent.

Lsp.Editor:trace-value

The trace configuration, synchronized with the language server.

Lsp.Editor:cancellable
No description available.

Lsp.Editor:init-result

The initialization info we got from the language server.

Lsp.Editor:text-documents
No description available.

Signals

Lsp.Editor::show-message

Emitted when we receive a window/showMessage notification.

Lsp.Editor::publish-diagnostics

Emitted when we receive a textDocument/publishDiagnostics notification.

Lsp.Editor::log-trace

Emitted when we receive a $/logTrace notification.

Lsp.Editor::log-message

Emitted when we receive a window/logMessage notification.

Signals inherited from JsonrpcServer (4)
JsonrpcServer::client-accepted

This signal is emitted when a new client has been accepted.

JsonrpcServer::client-closed

This signal is emitted when a new client has been lost.

JsonrpcServer::handle-call

This method is emitted when the client requests a method call.

JsonrpcServer::notification

This signal is emitted when the client has sent a notification to us.

Signals inherited from GObject (1)
GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

Class structure

struct LspEditorClass {
  void (* apply_workspace_edit_async) (
    LspEditor* self,
    LspWorkspaceEdit* edit,
    const gchar* label,
    GAsyncReadyCallback _callback_,
    void* _callback__target
  );
  LspApplyWorkspaceEditResult* (* apply_workspace_edit_finish) (
    LspEditor* self,
    GAsyncResult* _res_,
    GError** error
  );
  void (* show_message_request_async) (
    LspEditor* self,
    LspMessageType type,
    const gchar* message,
    LspMessageActionItem* actions,
    gint actions_length1,
    GAsyncReadyCallback _callback_,
    void* _callback__target
  );
  LspMessageActionItem* (* show_message_request_finish) (
    LspEditor* self,
    GAsyncResult* _res_,
    GError** error
  );
  void (* show_document_async) (
    LspEditor* self,
    GUri* uri,
    gboolean external,
    gboolean take_focus,
    LspRange* selection,
    GAsyncReadyCallback _callback_,
    void* _callback__target
  );
  gboolean (* show_document_finish) (
    LspEditor* self,
    GAsyncResult* _res_,
    GError** error
  );
  
}

No description available.

Class members
apply_workspace_edit_async: void (* apply_workspace_edit_async) ( LspEditor* self, LspWorkspaceEdit* edit, const gchar* label, GAsyncReadyCallback _callback_, void* _callback__target )

No description available.

apply_workspace_edit_finish: LspApplyWorkspaceEditResult* (* apply_workspace_edit_finish) ( LspEditor* self, GAsyncResult* _res_, GError** error )

No description available.

show_message_request_async: void (* show_message_request_async) ( LspEditor* self, LspMessageType type, const gchar* message, LspMessageActionItem* actions, gint actions_length1, GAsyncReadyCallback _callback_, void* _callback__target )

No description available.

show_message_request_finish: LspMessageActionItem* (* show_message_request_finish) ( LspEditor* self, GAsyncResult* _res_, GError** error )

No description available.

show_document_async: void (* show_document_async) ( LspEditor* self, GUri* uri, gboolean external, gboolean take_focus, LspRange* selection, GAsyncReadyCallback _callback_, void* _callback__target )

No description available.

show_document_finish: gboolean (* show_document_finish) ( LspEditor* self, GAsyncResult* _res_, GError** error )

No description available.

Virtual methods

Lsp.EditorClass.apply_workspace_edit_async

The workspace/applyEdit request is sent from the server to the client to apply a workspace edit.

Lsp.EditorClass.show_message_request_async

Asks the user to select an action for a server-provided message.

Lsp.EditorClass.show_document_async

Shows a server-provided resource in the editor.

Lsp.EditorClass.show_document_finish
No description available.