summaryrefslogtreecommitdiff
path: root/clang-tools-extra/clangd/CodeComplete.h
diff options
context:
space:
mode:
authorKadir Cetinkaya <kadircet@google.com>2018-08-17 15:42:54 +0000
committerKadir Cetinkaya <kadircet@google.com>2018-08-17 15:42:54 +0000
commit6c9f15c533811937b51be1e1f8975fc54e18f40b (patch)
treeebae8c1be65d7b13314cc5c847f0bc63f09aedf4 /clang-tools-extra/clangd/CodeComplete.h
parent2532ac880a3fec0b3282d18a00d54d27b1d5cb5a (diff)
downloadllvm-6c9f15c533811937b51be1e1f8975fc54e18f40b.tar.gz
[clangd] Add parantheses while auto-completing functions.
Summary: Currently we only add parantheses to the functions if snippets are enabled, which also inserts snippets for parameters into parantheses. Adding a new option to put only parantheses. Also it moves the cursor within parantheses or at the end of them by looking at whether completion item has any parameters or not. Still requires snippets support on the client side. Reviewers: ioeric, ilya-biryukov, hokein Reviewed By: ioeric Subscribers: MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D50835 llvm-svn: 340040
Diffstat (limited to 'clang-tools-extra/clangd/CodeComplete.h')
-rw-r--r--clang-tools-extra/clangd/CodeComplete.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang-tools-extra/clangd/CodeComplete.h b/clang-tools-extra/clangd/CodeComplete.h
index 9ef2b1fbaf5d..1d85a66ec44b 100644
--- a/clang-tools-extra/clangd/CodeComplete.h
+++ b/clang-tools-extra/clangd/CodeComplete.h
@@ -82,6 +82,10 @@ struct CodeCompleteOptions {
/// Include completions that require small corrections, e.g. change '.' to
/// '->' on member access etc.
bool IncludeFixIts = false;
+
+ /// Whether to generate snippets for function arguments on code-completion.
+ /// Needs snippets to be enabled as well.
+ bool EnableFunctionArgSnippets = true;
};
// Semi-structured representation of a code-complete suggestion for our C++ API.