Skip to content

Commit

Permalink
Notice user if got error message from lsp server.
Browse files Browse the repository at this point in the history
  • Loading branch information
manateelazycat committed Oct 5, 2023
1 parent 78c2e9a commit 54263fd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions core/lspserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,14 @@ def handle_recv_message(self, message: dict):
if self.enable_diagnostics and is_in_path_dict(self.files, filepath):
get_from_path_dict(self.files, filepath).record_diagnostics(message["params"]["diagnostics"], self.server_info["name"])

# Notice user if got error message from lsp server.
if "method" in message and message["method"] == "window/logMessage":
try:
if "error" in message["params"]["message"].lower():
message_emacs("{} ({}): {}".format(self.project_name, self.server_info["name"], message["params"]["message"]))
except:
pass

logger.debug(json.dumps(message, indent=3))

if "id" in message:
Expand Down

0 comments on commit 54263fd

Please sign in to comment.