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

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 12 07:20:14 PDT 2022


sammccall added a comment.

In D128621#3645123 <https://reviews.llvm.org/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 before VSCode change, i.e. won't "eat" an extra tab press at the end of completion session.
> I feel that's the trade-off we should pick.
>
> What do others think?

Put some thoughts in https://github.com/clangd/clangd/issues/1190
TL;DR:

- I think fixing this only in the server for future releases (and not touching vscode-clangd) is OK
- Of the ideas we've heard, I like `${0:named}` => `$0` best, but can certainly live with the one in this patch
- (I think we could refine behavior further, but let's not block on it)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128621/new/

https://reviews.llvm.org/D128621



More information about the cfe-commits mailing list