15 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_CODECOMPLETE_H 16 #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_CODECOMPLETE_H 23 #include "clang/Frontend/PrecompiledPreamble.h" 24 #include "clang/Sema/CodeCompleteConsumer.h" 25 #include "clang/Sema/CodeCompleteOptions.h" 26 #include "clang/Tooling/CompilationDatabase.h" 30 class PCHContainerOperations;
109 unsigned BundleSize = 1;
127 float ExcludingName = 0.f;
137 float Relevance = 0.f;
147 bool HasMore =
false;
154 const tooling::CompileCommand &
Command,
155 PrecompiledPreamble
const *
Preamble,
158 IntrusiveRefCntPtr<vfs::FileSystem>
VFS,
159 std::shared_ptr<PCHContainerOperations>
PCHs,
164 const tooling::CompileCommand &
Command,
165 PrecompiledPreamble
const *
Preamble,
167 IntrusiveRefCntPtr<vfs::FileSystem>
VFS,
168 std::shared_ptr<PCHContainerOperations>
PCHs);
bool ShowOrigins
Expose origins of completion items in the label (for debugging).
bool BundleOverloads
Combine overloads into a single completion item where possible.
size_t Limit
Limit the number of results returned (0 means no limit).
CodeCompleteResult codeComplete(PathRef FileName, const tooling::CompileCommand &Command, PrecompiledPreamble const *Preamble, const IncludeStructure &PreambleInclusions, StringRef Contents, Position Pos, IntrusiveRefCntPtr< vfs::FileSystem > VFS, std::shared_ptr< PCHContainerOperations > PCHs, CodeCompleteOptions Opts)
Get code completions at a specified Pos in FileName.
SignatureHelp signatureHelp(PathRef FileName, const tooling::CompileCommand &Command, PrecompiledPreamble const *Preamble, StringRef Contents, Position Pos, IntrusiveRefCntPtr< vfs::FileSystem > VFS, std::shared_ptr< PCHContainerOperations > PCHs)
Get signature help at a specified Pos in FileName.
bool EnableSnippets
When true, completion items will contain expandable code snippets in completion (e.g.
std::vector< CodeCompletion > Completions
Interface for symbol indexes that can be used for searching or matching symbols among a set of symbol...
llvm::StringRef PathRef
A typedef to represent a ref to file path.
std::string SnippetSuffix
CompletionItemKind
The kind of a completion entry.
std::string Documentation
bool IncludeComments
Add comments to code completion results, if available.
bool IncludeCodePatterns
Add code patterns to completion results.
bool isIndexedForCodeCompletion(const NamedDecl &ND, ASTContext &ASTCtx)
A visual indicator to prepend to the completion label to indicate whether completion result would tri...
bool IncludeIneligibleResults
Include results that are not legal completions in the current context.
PrecompiledPreamble const * Preamble
A context is an immutable container for per-request data that must be propagated through layers that ...
clang::CodeCompleteOptions getClangCompleteOpts() const
Returns options that can be passed to clang's completion engine.
IntrusiveRefCntPtr< vfs::FileSystem > VFS
const SymbolIndex * Index
If Index is set, it is used to augment the code completion results.
Represents the signature of a callable.
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
llvm::Optional< TextEdit > HeaderInsertion
std::shared_ptr< PCHContainerOperations > PCHs
struct clang::clangd::CodeCompleteOptions::IncludeInsertionIndicator IncludeIndicator
bool IncludeMacros
Add macros to code completion results.
std::string RequiredQualifier
raw_ostream & operator<<(raw_ostream &OS, const CodeCompletion &C)