[PATCH] D128621: [clangd] Do not try to use $0 as a placeholder in completion snippets

2022-07-24 Thread Nathan Ridge via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG2eba08fd9a5f: [clangd] Do not try to use $0 as a placeholder in completion snippets (authored by nridge). Repository: rG LLVM Github Monorepo

[PATCH] D128621: [clangd] Do not try to use $0 as a placeholder in completion snippets

2022-07-24 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 447112. nridge added a comment. Address final review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128621/new/ https://reviews.llvm.org/D128621 Files:

[PATCH] D128621: [clangd] Do not try to use $0 as a placeholder in completion snippets

2022-07-18 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. Thank you! Comment at: clang-tools-extra/clangd/CodeCompletionStrings.cpp:195 ++SnippetArg; - *Snippet += - "${" + - std::to_string(SnippetArg == CursorSnippetArg ? 0 : SnippetArg) +

[PATCH] D128621: [clangd] Do not try to use $0 as a placeholder in completion snippets

2022-07-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. thanks, LG, just some extra precautions. Comment at: clang-tools-extra/clangd/CodeCompletionStrings.cpp:195 ++SnippetArg; - *Snippet += - "${" + -

[PATCH] D128621: [clangd] Do not try to use $0 as a placeholder in completion snippets

2022-07-18 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. In D128621#3645271 , @sammccall wrote: > - Of the ideas we've heard, I like `${0:named}` => `$0` best, but can > certainly live with the one in this patch I like this approach as well. Revised the patch to do this. Repository:

[PATCH] D128621: [clangd] Do not try to use $0 as a placeholder in completion snippets

2022-07-18 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 445407. nridge added a comment. Revise patch to use $0 (no placeholder text) rather than ${n:placeholder} Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128621/new/ https://reviews.llvm.org/D128621 Files:

[PATCH] D128621: [clangd] Do not try to use $0 as a placeholder in completion snippets

2022-07-12 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D128621#3645123 , @ilya-biryukov wrote: > Another alternative that I think should give the best UX is to replace > `${0:named}` with `$0`. > The items will look different, but will behave identically to the old > behavior

[PATCH] D128621: [clangd] Do not try to use $0 as a placeholder in completion snippets

2022-07-12 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Another alternative that I think should give the best UX is to replace `${0:named}` with `$0`. The items will look different, but will behave identically to the old behavior before VSCode change, i.e. won't "eat" an extra tab press at the end of completion

[PATCH] D128621: [clangd] Do not try to use $0 as a placeholder in completion snippets

2022-06-27 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. My 2 cents here. We should probably try hard to keep the cursor inside braces/parentheses for those patterns. Having namespace foo { decls }^ <- cursor here hurts UX. It would be nice to get the old behavior back somehow. I still have hopes for the VSCode

[PATCH] D128621: [clangd] Do not try to use $0 as a placeholder in completion snippets

2022-06-27 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/CodeCompletionStrings.cpp:197 - "${" + - std::to_string(SnippetArg == CursorSnippetArg ? 0 : SnippetArg) + ':'; appendEscapeSnippet(Chunk.Text, Snippet); as you've

[PATCH] D128621: [clangd] Do not try to use $0 as a placeholder in completion snippets

2022-06-26 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. nridge added reviewers: hokein, ilya-biryukov, sammccall. Herald added subscribers: usaxena95, kadircet, arphaman. Herald added a project: All. nridge requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: