Skip to content

Commit 1aa918e

Browse files
authored
Add log message
1 parent dd31328 commit 1aa918e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: pylsp/workspace.py

+6
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ class Workspace:
4141
M_INITIALIZE_PROGRESS = "window/workDoneProgress/create"
4242
M_APPLY_EDIT = "workspace/applyEdit"
4343
M_SHOW_MESSAGE = "window/showMessage"
44+
M_LOG_MESSAGE = "window/logMessage"
4445

4546
def __init__(self, root_uri, endpoint, config=None):
4647
self._config = config
@@ -315,6 +316,11 @@ def _progress_end(self, token: str, message: Optional[str] = None) -> None:
315316
"value": value,
316317
},
317318
)
319+
320+
def log_message(self, message, msg_type=lsp.MessageType.Info):
321+
self._endpoint.notify(
322+
self.M_LOG_MESSAGE, params={"type": msg_type, "message": message}
323+
)
318324

319325
def show_message(self, message, msg_type=lsp.MessageType.Info):
320326
self._endpoint.notify(

0 commit comments

Comments
 (0)