This revision was automatically updated to reflect the committed changes.
Closed by commit rL340040: [clangd] Add parantheses while auto-completing
functions. (authored by kadircet, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D50835
ioeric accepted this revision.
ioeric added a comment.
This revision is now accepted and ready to land.
lgtm
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D50835
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.l
kadircet updated this revision to Diff 161265.
kadircet marked 3 inline comments as done.
kadircet added a comment.
- Resolve discussions.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D50835
Files:
clangd/CodeComplete.cpp
clangd/CodeComplete.h
unittests/clangd/CodeComple
kadircet added inline comments.
Comment at: clangd/CodeComplete.cpp:1381
+ // Check whether function has any parameters or not.
+ LSP.textEdit->newText += SnippetSuffix.size() > 2 ? "(${0})" : "()";
+}
ioeric wrote:
> I think we are missing one case
ioeric added inline comments.
Comment at: clangd/CodeComplete.cpp:1379
+ Kind == CompletionItemKind::Method) &&
+ SnippetSuffix.front() == '(' && SnippetSuffix.back() == ')') {
+ // Check whether function has any parameters or not.
n
kadircet updated this revision to Diff 161256.
kadircet added a comment.
- Only append to snippets of type function or method.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D50835
Files:
clangd/CodeComplete.cpp
clangd/CodeComplete.h
unittests/clangd/CodeCompleteTests.cpp
ioeric added inline comments.
Comment at: clangd/CodeComplete.cpp:1377
+ // Check whether function has any parameters or not.
+ LSP.textEdit->newText += SnippetSuffix.size() > 2 ? "(${0})" : "()";
+else
kadircet wrote:
> ioeric wrote:
> > There seem
kadircet marked 3 inline comments as done.
kadircet added inline comments.
Comment at: clangd/CodeComplete.cpp:1377
+ // Check whether function has any parameters or not.
+ LSP.textEdit->newText += SnippetSuffix.size() > 2 ? "(${0})" : "()";
+else
i
kadircet updated this revision to Diff 161243.
kadircet added a comment.
- Change option name.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D50835
Files:
clangd/CodeComplete.cpp
clangd/CodeComplete.h
unittests/clangd/CodeCompleteTests.cpp
Index: unittests/clangd/CodeCo
ioeric added inline comments.
Comment at: clangd/CodeComplete.cpp:1377
+ // Check whether function has any parameters or not.
+ LSP.textEdit->newText += SnippetSuffix.size() > 2 ? "(${0})" : "()";
+else
There seems to be no guarantee on whether the
ilya-biryukov added inline comments.
Comment at: clangd/CodeComplete.h:85
+
+ /// Enables cursor to be moved around according to completions needs even
when
+ /// snippets are disabled. For example selecting a function with parameters
as
kadircet wrote:
> ioe
kadircet added inline comments.
Comment at: clangd/CodeComplete.h:85
+
+ /// Enables cursor to be moved around according to completions needs even
when
+ /// snippets are disabled. For example selecting a function with parameters
as
ioeric wrote:
> IIRC, the
kadircet updated this revision to Diff 161023.
kadircet marked an inline comment as done.
kadircet added a comment.
- Change option name.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D50835
Files:
clangd/CodeComplete.cpp
clangd/CodeComplete.h
unittests/clangd/CodeComplet
ioeric added inline comments.
Comment at: clangd/CodeComplete.h:85
+
+ /// Enables cursor to be moved around according to completions needs even
when
+ /// snippets are disabled. For example selecting a function with parameters
as
IIRC, the goal of this patch
kadircet created this revision.
kadircet added reviewers: ioeric, ilya-biryukov, hokein.
Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay.
Currently we only add parantheses to the functions if snippets are
enabled, which also inserts snippets for parameters into parantheses. Addin
15 matches
Mail list logo