Lines Matching defs:completion

23   // a completion, but that the completed token is still incomplete. Examples
25 // the file path token is still incomplete after the completion. Clients
26 // should not indicate to the user that this is a full completion (e.g. by
27 // not inserting the usual trailing space after a successful completion).
29 // The full line has been rewritten by the completion.
35 /// A single completion and all associated data.
43 Completion(llvm::StringRef completion, llvm::StringRef description,
45 : m_completion(completion.str()), m_descripton(description.str()),
51 /// Generates a string that uniquely identifies this completion result.
62 void AddResult(llvm::StringRef completion, llvm::StringRef description,
67 /// Adds all collected completion matches to the given list.
72 /// Adds all collected completion descriptions to the given list.
89 /// Constructs a completion request.
96 /// the cursor is at the start of the line. The completion starts from
133 /// Adds a possible completion string. If the completion was already
135 /// the suggested completion is stored, so the given string can be free'd
138 /// \param match The suggested completion.
139 /// \param completion An optional description of the completion string. The
140 /// description will be displayed to the user alongside the completion.
141 /// \param mode The CompletionMode for this completion.
142 void AddCompletion(llvm::StringRef completion,
145 m_result.AddResult(completion, description, mode);
148 /// Adds a possible completion string if the completion would complete the
151 /// \param match The suggested completion.
152 /// \param description An optional description of the completion string. The
153 /// description will be displayed to the user alongside the completion.
155 void TryCompleteCurrentArg(llvm::StringRef completion,
162 if (completion.startswith(GetCursorArgumentPrefix()))
163 AddCompletion(completion, description, M);
166 /// Adds multiple possible completion strings.
172 for (const std::string &completion : completions)
173 AddCompletion(completion);
176 /// Adds multiple possible completion strings alongside their descriptions.
203 /// The index of the argument in which the completion cursor is.