[PATCH] D37101: [clangd] [WIP] Add support for snippet completions

Raoul Wols via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Sep 2 02:16:39 PDT 2017


rwols updated this revision to Diff 113650.
rwols marked 3 inline comments as done.
rwols added a comment.

- Split up the CompletionItemsCollector into two classes called PlainTextCompletionItemsCollector and SnippetCompletionItemsCollector to allow collecting both types of items.
- Add a command-line setting to clangd called "--enable-snippets" that, when set, will make clangd use the SnippetCompletionItemsCollector. The default is to use the PlainTextCompletionItemsCollector.
- Enable "code pattern" completions when "--enable-snippets" is true.
- Do not add a space in the completion label when we encounter a CK_VerticalSpace in the SnippetCompletionItemsCollector. A space looks weird.

I will add tests now.


https://reviews.llvm.org/D37101

Files:
  clangd/ClangdLSPServer.cpp
  clangd/ClangdLSPServer.h
  clangd/ClangdServer.cpp
  clangd/ClangdServer.h
  clangd/ClangdUnit.cpp
  clangd/ClangdUnit.h
  clangd/Protocol.cpp
  clangd/Protocol.h
  clangd/tool/ClangdMain.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37101.113650.patch
Type: text/x-patch
Size: 21210 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170902/128ff575/attachment-0001.bin>


More information about the cfe-commits mailing list