summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clangd/CodeCompletionStrings.h
Commit message (Collapse)AuthorAgeFilesLines
* [clangd] Place cursor better after completing patternsIlya Biryukov2019-05-281-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | Summary: By producing the $0 marker in the snippets at the last placeholder. This produces nicer results in most cases, e.g. for namespace <#name#> { <#decls#> } we now produce ${0:decls} instead of ${2:decls} and the final cursor placement is more convenient. Reviewers: hokein Reviewed By: hokein Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62389 llvm-svn: 361841
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [clangd] Show function documentation in signature helpIlya Biryukov2018-08-171-12/+2
| | | | | | | | | | | | | | | | | | | | | | Summary: Previously, clangd was trying to show documentation for the active parameter instead, which is wrong per LSP specification. Moreover, the code path that attempts to get parameter comments never succeds, because no attempt is made to parse function doc comment and extract parameter-specific parts out of it. So we also remove the code that claims to fetch parameter comments: it is not used anymore and is incorrect. Reviewers: hokein, ioeric, kadircet Reviewed By: ioeric Subscribers: MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D50726 llvm-svn: 340004
* NFC: Enforce good formatting across multiple clang-tools-extra filesKirill Bobyrev2018-08-141-3/+4
| | | | | | | | | | | This patch improves readability of multiple files in clang-tools-extra and enforces LLVM Coding Guidelines. Reviewed by: ioeric Differential Revision: https://reviews.llvm.org/D50707 llvm-svn: 339687
* [clangd] More precise representation of symbol names/labels in the index.Sam McCall2018-06-221-8/+10
| | | | | | | | | | | | | | | | | | | | | | Summary: Previously, the strings matched LSP completion pretty closely. The completion label was a single string, for instance. This made implementing completion itself easy but makes it hard to use the names in other way, e.g. pretty-printed name in synthesized documentation/hover. It also limits our introspection into completion items, which can only be as precise as the indexed symbols. This change is a prerequisite to improvements to overload bundling which need to inspect e.g. signature structure. Reviewers: ioeric Subscribers: ilya-biryukov, MaskRay, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D48475 llvm-svn: 335360
* [clangd] Remove FilterText from the index.Sam McCall2018-06-221-5/+0
| | | | | | | | | | | | | | | | | Summary: It's almost always identical to Name, and in fact we never used it (we used name instead). The only case where they differ is objc method selectors (foo: vs foo:bar:). We can live with the latter for both name and filterText, so I've made that change too. Reviewers: ioeric Subscribers: ilya-biryukov, MaskRay, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D48375 llvm-svn: 335321
* [clangd] Serve comments for headers decls from dynamic index onlyIlya Biryukov2018-05-241-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: To fix a crash in code completion that occurrs when reading doc comments from files that were updated after the preamble was computed. In that case, the files on disk could've been changed and we can't rely on finding the comment text with the same range anymore. The current workaround is to not provide comments from the headers at all and rely on the dynamic index instead. A more principled solution would be to store contents of the files read inside the preamble, but it is way harder to implement properly, given that it would definitely increase the sizes of the preamble. Together with D47272, this should fix all preamble-related crashes we're aware of. Reviewers: sammccall Reviewed By: sammccall Subscribers: klimek, ioeric, MaskRay, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D47274 llvm-svn: 333189
* [clangd] Retrieve minimally formatted comment text in completion.Ilya Biryukov2018-05-161-3/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Previous implementation used to extract brief text from doxygen comments. Brief text parsing slows down completion and is not suited for non-doxygen comments. This commit switches to providing comments that mimic the ones originally written in the source code, doing minimal reindenting and removing the comments markers to make the output more user-friendly. It means we lose support for doxygen-specific features, e.g. extracting brief text, but provide useful results for non-doxygen comments. Switching the doxygen support back is an option, but I suggest to see whether the current approach gives more useful results. Reviewers: sammccall, hokein, ioeric Reviewed By: sammccall Subscribers: klimek, MaskRay, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D45999 llvm-svn: 332459
* [clangd] Pull CodeCompletionString handling logic into its own file and add ↵Eric Liu2017-12-201-0/+46
unit test. Reviewers: sammccall Subscribers: klimek, mgorny, ilya-biryukov, cfe-commits Differential Revision: https://reviews.llvm.org/D41450 llvm-svn: 321193
OpenPOWER on IntegriCloud