From e3774ee5f3140bc732d81ab1a737b67bb651bbd2 Mon Sep 17 00:00:00 2001 From: itdominator <1itdominator@gmail.com> Date: Mon, 30 Sep 2024 18:40:23 -0500 Subject: [PATCH] Extending response type --- .../widgets/base/notebook/editor_controller.py | 2 +- src/libs/dto/lsp_message_structs.py | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/core/widgets/base/notebook/editor_controller.py b/src/core/widgets/base/notebook/editor_controller.py index 8c2b6a6..e2630d9 100644 --- a/src/core/widgets/base/notebook/editor_controller.py +++ b/src/core/widgets/base/notebook/editor_controller.py @@ -9,7 +9,7 @@ from gi.repository import GLib from gi.repository import GtkSource # Application imports -from libs.dto.lsp_message_structs import LSPResponseTypes, LSPResponseRequest, LSPResponseNotification +from libs.dto.lsp_message_structs import LSPResponseTypes, LSPResponseRequest, LSPResponseNotification, LSPIDResponseNotification from .key_input_controller import KeyInputController from .editor_events import EditorEventsMixin from ...completion_item import CompletionItem diff --git a/src/libs/dto/lsp_message_structs.py b/src/libs/dto/lsp_message_structs.py index fc1a325..eae0ad4 100644 --- a/src/libs/dto/lsp_message_structs.py +++ b/src/libs/dto/lsp_message_structs.py @@ -36,6 +36,19 @@ class LSPResponseNotification(object): method: str params: dict +@dataclass +class LSPIDResponseNotification(object): + """ + Constructs a new LSP Response Notification instance. -class LSPResponseTypes(LSPResponseRequest, LSPResponseNotification): + :param str method: The type of lsp notification being made. + :params dict result: The arguments of the given method. + """ + jsonrpc: str + id: int + method: str + params: dict + + +class LSPResponseTypes(LSPResponseRequest, LSPResponseNotification, LSPIDResponseNotification): ... \ No newline at end of file