🎨 style(core): normalize lifecycle implementation
This commit is contained in:
@@ -171,8 +171,7 @@ namespace lsp::test::provider
|
||||
manager::ManagerHub hub{};
|
||||
core::ExecutionContext context;
|
||||
|
||||
ProviderEnv()
|
||||
: context(scheduler, hub)
|
||||
ProviderEnv() : context(scheduler, hub)
|
||||
{
|
||||
hub.Initialize();
|
||||
}
|
||||
@@ -1411,8 +1410,7 @@ namespace lsp::test::provider
|
||||
auto tooltip_it = resolved.find("tooltip");
|
||||
assertTrue(tooltip_it != resolved.end(), "InlayHint resolve should set tooltip");
|
||||
assertTrue(tooltip_it->second.Is<protocol::string>(), "InlayHint tooltip should be string");
|
||||
assertEqual(std::string("param: int"), tooltip_it->second.Get<protocol::string>(),
|
||||
"InlayHint tooltip should use detail");
|
||||
assertEqual(std::string("param: int"), tooltip_it->second.Get<protocol::string>(), "InlayHint tooltip should use detail");
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -2891,10 +2889,8 @@ namespace lsp::test::provider
|
||||
{
|
||||
protocol::LSPObject diagnostic;
|
||||
diagnostic["range"] = protocol::LSPObject{
|
||||
{ "start", protocol::LSPObject{ { "line", static_cast<protocol::integer>(error.location.start_line) },
|
||||
{ "character", static_cast<protocol::integer>(error.location.start_column) } } },
|
||||
{ "end", protocol::LSPObject{ { "line", static_cast<protocol::integer>(error.location.end_line) },
|
||||
{ "character", static_cast<protocol::integer>(error.location.end_column) } } },
|
||||
{ "start", protocol::LSPObject{ { "line", static_cast<protocol::integer>(error.location.start_line) }, { "character", static_cast<protocol::integer>(error.location.start_column) } } },
|
||||
{ "end", protocol::LSPObject{ { "line", static_cast<protocol::integer>(error.location.end_line) }, { "character", static_cast<protocol::integer>(error.location.end_column) } } },
|
||||
};
|
||||
diagnostic["message"] = error.message;
|
||||
diagnostics.emplace_back(std::move(diagnostic));
|
||||
|
||||
Reference in New Issue
Block a user