[PATCH] D64391: [CodeComplete] an option to suppress endings for header completion

2019-07-13 Thread Cai Rijun via Phabricator via cfe-commits
richard9404 added a comment. I think we should first think about what are participating in a modularised development environment. In terms of code completion, there are usually four layers: - a "backend" which knows everything about the language, e.g. ClangSema - a "frontend" which follows some

[PATCH] D64391: [CodeComplete] an option to suppress endings for header completion

2019-07-09 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Thanks for digging through this! Adding an option doesn't avoid a decision about what the behavior will be. >99% of users will use the default for something as fine-grained as this. So we need to find a default that works well for most people. And if it's good enough

[PATCH] D64391: [CodeComplete] an option to suppress endings for header completion

2019-07-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:1088 + + if (Trigger == "/") { // trigger only on '#include.../' +auto StartOfLine = Code->rfind('\n', *Offset); i think instead of regex, it would be better to just per

[PATCH] D64391: [CodeComplete] an option to suppress endings for header completion

2019-07-09 Thread Cai Rijun via Phabricator via cfe-commits
richard9404 created this revision. richard9404 added reviewers: sammccall, ilya-biryukov. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous. Herald added a project: clang. Header completion in clang always apppends endings to the results, i.e. `/` for folders and `"` (or `>`) for