Skip to content

Commit eba4c0e

Browse files
Dylmayccordoba12
authored andcommitted
Add log message
1 parent 9b79576 commit eba4c0e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pylsp/workspace.py

Lines changed: 6 additions & 0 deletions
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
@@ -323,6 +324,11 @@ def _progress_end(self, token: str, message: Optional[str] = None) -> None:
323324
"value": value,
324325
},
325326
)
327+
328+
def log_message(self, message, msg_type=lsp.MessageType.Info):
329+
self._endpoint.notify(
330+
self.M_LOG_MESSAGE, params={"type": msg_type, "message": message}
331+
)
326332

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

0 commit comments

Comments
 (0)