#include #include "./did_close.hpp" #include "../../protocol/transform/facade.hpp" #include "../../service/document.hpp" namespace lsp::providers::text_document { std::string DidClose::GetMethod() const { return "textDocument/didClose"; } std::string DidClose::GetProviderName() const { return "TextDocumentDidClose"; } void DidClose::HandleNotification(const protocol::NotificationMessage& notification, ExecutionContext& context) { spdlog::debug("TextDocumentDidCloseProvider: Providing response for method {}", notification.method); protocol::DidCloseTextDocumentParams did_close_text_document_params = transform::As(notification.params.value()); service::Document& document_service = context.GetService(); document_service.CloseDocument(did_close_text_document_params); spdlog::info("Document closed: {}", did_close_text_document_params.textDocument.uri); } }