#pragma once #include "language_server_api.h" #include #include // Cached completion information, so we can give fast completion results when // the user erases a character. vscode will resend the completion request if // that happens. struct CodeCompleteCache { // NOTE: Make sure to access these variables under |WithLock|. optional cached_path_; optional cached_completion_position_; std::vector cached_results_; std::mutex mutex_; void WithLock(std::function action); bool IsCacheValid(lsTextDocumentPositionParams position); };