[PATCH] D128621: [clangd] Do not try to use $0 as a placeholder in completion snippets
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 27 01:17:01 PDT 2022
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 mentioned in the vscode issue, i think it'd be better to append a `$0` when we reach `CursorSnippetArg`. it's annoying that we require an extra tab, but IMO it's still better than just requiring user to move around a bunch.
also i think it makes sense to wait for a little while until we hear back from vscode folks about a workaround. Despite them saying $0 is not a placeholder, LSP doesn't clearly state that. hence clangd might not be the only language server that's affected from this.
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