feat: add config option lsp_output "quiet" to reduce LSP log verbosity
Set the option to "verbose" to re-enable logging of LSP show/logMessage requests.
This commit is contained in:
parent
72423471f1
commit
69ea495495
4 changed files with 18 additions and 4 deletions
|
|
@ -608,10 +608,11 @@ const Process = struct {
|
|||
return if (std.mem.eql(u8, method, "textDocument/publishDiagnostics"))
|
||||
project.publish_diagnostics(self.parent.ref(), params_cb)
|
||||
else if (std.mem.eql(u8, method, "window/showMessage"))
|
||||
project.show_message(self.parent.ref(), params_cb)
|
||||
project.show_message(params_cb)
|
||||
else if (std.mem.eql(u8, method, "window/logMessage"))
|
||||
project.show_message(self.parent.ref(), params_cb)
|
||||
project.log_message(params_cb)
|
||||
else {
|
||||
if (!tp.env.get().is("lsp_verbose")) return;
|
||||
const params = try cbor.toJsonAlloc(self.allocator, params_cb);
|
||||
defer self.allocator.free(params);
|
||||
self.logger.print("LSP notification: {s} -> {s}", .{ method, params });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue