Change notification method in log

Currently in the log function in main, the notification method used to send logs to the client is "window/showMessage". This creates an a notification on the UI on VSCode that can cause slow downs. I propose a change to use the  "window/logMessage" method instead, which is intended to be used for logging.
This commit is contained in:
Omar Alhammadi 2021-11-04 12:55:38 +04:00 committed by Auguste Rame
parent d4b6b97c01
commit 12cda9b031

View File

@ -61,9 +61,9 @@ pub fn log(comptime message_level: std.log.Level, comptime scope: @Type(.EnumLit
.err => .Error, .err => .Error,
}; };
send(&arena, types.Notification{ send(&arena, types.Notification{
.method = "window/showMessage", .method = "window/logMessage",
.params = types.Notification.Params{ .params = types.Notification.Params{
.ShowMessage = .{ .LogMessage = .{
.type = message_type, .type = message_type,
.message = message, .message = message,
}, },