♻️ 重构

This commit is contained in:
csh
2025-12-05 21:03:18 +08:00
parent 4c2e242920
commit 549f1d1b0a
161 changed files with 26415 additions and 28009 deletions
+5 -6
View File
@@ -14,26 +14,25 @@ namespace lsp::provider
return "SetTrace";
}
void SetTrace::HandleNotification(const protocol::NotificationMessage& notification, ExecutionContext& context)
void SetTrace::HandleNotification(const protocol::NotificationMessage& notification, [[maybe_unused]] ExecutionContext& context)
{
static_cast<void>(context);
spdlog::debug("SetTraceProvider: Providing response for method {}", notification.method);
spdlog::debug("SetTrace notification {}", notification.method);
protocol::SetTraceParams params = transform::FromLSPAny.template operator()<protocol::SetTraceParams>(notification.params.value());
if (params.value == protocol::TraceValueLiterals::Off)
{
spdlog::set_level(spdlog::level::info);
spdlog::info("SetTrace: Tacing disabled");
spdlog::debug("Trace level set to off");
}
else if (params.value == protocol::TraceValueLiterals::Messages)
{
spdlog::set_level(spdlog::level::debug);
spdlog::info("SetTrace: Tacing enabled (message only)");
spdlog::debug("Trace level set to debug (messages)");
}
else if (params.value == protocol::TraceValueLiterals::Verbose)
{
spdlog::set_level(spdlog::level::trace);
spdlog::info("SetTrace: Tacing enabled (verbose)");
spdlog::debug("Trace level set to trace (verbose)");
}
}