#include "SyncAPI.h"
#include "Protocol.h"
#include "index/Index.h"
#include <optional>
namespace clang {
namespace clangd {
void runAddDocument(ClangdServer &Server, PathRef File,
llvm::StringRef Contents, llvm::StringRef Version,
WantDiagnostics WantDiags, bool ForceRebuild) { … }
namespace {
template <typename T> struct CaptureProxy { … };
template <typename T> CaptureProxy<T> capture(std::optional<T> &Target) { … }
}
llvm::Expected<CodeCompleteResult>
runCodeComplete(ClangdServer &Server, PathRef File, Position Pos,
clangd::CodeCompleteOptions Opts) { … }
llvm::Expected<SignatureHelp> runSignatureHelp(ClangdServer &Server,
PathRef File, Position Pos,
MarkupKind DocumentationFormat) { … }
llvm::Expected<std::vector<LocatedSymbol>>
runLocateSymbolAt(ClangdServer &Server, PathRef File, Position Pos) { … }
llvm::Expected<std::vector<DocumentHighlight>>
runFindDocumentHighlights(ClangdServer &Server, PathRef File, Position Pos) { … }
llvm::Expected<RenameResult> runRename(ClangdServer &Server, PathRef File,
Position Pos, llvm::StringRef NewName,
const RenameOptions &RenameOpts) { … }
llvm::Expected<RenameResult>
runPrepareRename(ClangdServer &Server, PathRef File, Position Pos,
std::optional<std::string> NewName,
const RenameOptions &RenameOpts) { … }
llvm::Expected<tooling::Replacements>
runFormatFile(ClangdServer &Server, PathRef File, std::optional<Range> Rng) { … }
SymbolSlab runFuzzyFind(const SymbolIndex &Index, llvm::StringRef Query) { … }
SymbolSlab runFuzzyFind(const SymbolIndex &Index, const FuzzyFindRequest &Req) { … }
RefSlab getRefs(const SymbolIndex &Index, SymbolID ID) { … }
llvm::Expected<std::vector<SelectionRange>>
runSemanticRanges(ClangdServer &Server, PathRef File,
const std::vector<Position> &Pos) { … }
llvm::Expected<std::optional<clangd::Path>>
runSwitchHeaderSource(ClangdServer &Server, PathRef File) { … }
llvm::Error runCustomAction(ClangdServer &Server, PathRef File,
llvm::function_ref<void(InputsAndAST)> Action) { … }
}
}