[PATCH] D48163: [clangd] UI for completion items that would trigger include insertion.

2018-06-15 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE334828: [clangd] UI for completion items that would trigger include insertion. (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D48163?vs=151498&id=151499#toc Re

[PATCH] D48163: [clangd] UI for completion items that would trigger include insertion.

2018-06-15 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 151498. ioeric added a comment. - clang-format again... Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D48163 Files: clangd/CodeComplete.cpp clangd/CodeComplete.h clangd/Headers.cpp clangd/Headers.h test/clangd/completion-snippets.t

[PATCH] D48163: [clangd] UI for completion items that would trigger include insertion.

2018-06-15 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/CodeComplete.h:63 - // Populated internally by clangd, do not set. + /// Populated internally by clangd, do not set. /// If `Index` is set, it is used to augment the code completion sammccall wrote: > if you

[PATCH] D48163: [clangd] UI for completion items that would trigger include insertion.

2018-06-15 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 151497. ioeric added a comment. - fix typo and clang-format Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D48163 Files: clangd/CodeComplete.cpp clangd/CodeComplete.h clangd/Headers.cpp clangd/Headers.h test/clangd/completion-snippe

[PATCH] D48163: [clangd] UI for completion items that would trigger include insertion.

2018-06-15 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 151496. ioeric marked 6 inline comments as done. ioeric added a comment. - addressed review comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D48163 Files: clangd/CodeComplete.cpp clangd/CodeComplete.h clangd/Headers.cpp clangd

[PATCH] D48163: [clangd] UI for completion items that would trigger include insertion.

2018-06-15 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/CodeComplete.cpp:313 +I.label = +(InsertingInclude ? Opts.IncludeInsertionIndicator : " ") + I.label; I.scoreInfo = Scores; sammccall wrote: > string(IncludeInsertionIndicator.size(), ' ')? oops

[PATCH] D48163: [clangd] UI for completion items that would trigger include insertion.

2018-06-15 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: clangd/CodeComplete.cpp:301 + } else if (!IncludePath->empty()) { +if (auto Edit = Includes.insert(*IncludePath)) { +

[PATCH] D48163: [clangd] UI for completion items that would trigger include insertion.

2018-06-15 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Thanks for the review! Comment at: clangd/CodeComplete.cpp:187 + // Whether or not this candidate is in a completion where index is allowed. + // This can affect how items are built (e.g. indent label to align with visual + // indicator in index resu

[PATCH] D48163: [clangd] UI for completion items that would trigger include insertion.

2018-06-15 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 151492. ioeric marked 6 inline comments as done. ioeric added a comment. - Addressed review comments. - Merged with orgin/master Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D48163 Files: clangd/CodeComplete.cpp clangd/CodeComplete.h

[PATCH] D48163: [clangd] UI for completion items that would trigger include insertion.

2018-06-14 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Oops, forgot to link to the bundling patch: https://reviews.llvm.org/D47957 We should expect some conflicts one way or the other. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D48163 ___ cfe-commits mailin

[PATCH] D48163: [clangd] UI for completion items that would trigger include insertion.

2018-06-14 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/CodeComplete.cpp:187 + // Whether or not this candidate is in a completion where index is allowed. + // This can affect how items are built (e.g. indent label to align with visual + // indicator in index results). --

[PATCH] D48163: [clangd] UI for completion items that would trigger include insertion.

2018-06-14 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/CodeComplete.cpp:278 +if (AllowIndexCompletion) + I.label = (InsertingInclude ? "+" : " ") + I.label; I.scoreInfo = Scores; sammccall wrote: > I think we should avoid tokens that occur commonly in C++

[PATCH] D48163: [clangd] UI for completion items that would trigger include insertion.

2018-06-14 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 151357. ioeric added a comment. - s/+/•/ and make the icon an code completion option to avoid hardcodes in multiple places. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D48163 Files: clangd/CodeComplete.cpp clangd/CodeComplete.h clan

[PATCH] D48163: [clangd] UI for completion items that would trigger include insertion.

2018-06-14 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Ooh, bikeshed first! Comment at: clangd/CodeComplete.cpp:278 +if (AllowIndexCompletion) + I.label = (InsertingInclude ? "+" : " ") + I.label; I.scoreInfo = Scores; I think we should avoid tokens that occur commonly in C+

[PATCH] D48163: [clangd] UI for completion items that would trigger include insertion.

2018-06-14 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added reviewers: sammccall, ilya-biryukov, hokein. Herald added subscribers: cfe-commits, jkorous, MaskRay. For completion items that would trigger include insertions (i.e. index symbols that are not #included yet), add a visual indicator "+" before the complet