Commit Graph

13 Commits

Author SHA1 Message Date
Malcolm Parsons 5831a00634 [docs] Remove doubled spaces
Reviewers: aaron.ballman

Subscribers: nemanjai, cfe-commits

Differential Revision: https://reviews.llvm.org/D26798

llvm-svn: 287226
2016-11-17 14:26:45 +00:00
Haojian Wu 0e1a50e9c4 Overhaul clang-include-fixer.el
General overhaul to fix many coding bugs, simplify the code, and improve readability.

* Clarify documentation strings of user options.
* Say that clang-include-fixer-executable is a file to have auto completion.
* Allow user to select available options for clang-include-fixer-input-format. Turn it into a symbol as it's not a free-form string.
* Remove clang-include-fixer-query-mode. This option was apparently used to select between two different operation modes, which is not a typical use case for user options. Provide two separate commands instead.
* Add a face for the overlay highlighting so that users can customize it.
Move user commands to the front so that readers of the code aren't buried in internal functions.
* Make process calls asynchronous. This is possible here because clang-include-fixer doesn't change files in place. This means input is no longer blocked while clang-include-fixer is running.
* Factor out logic in helper functions to keep functions short.
* Add comments where appropriate.
* Provide an alternative buffer replacement strategy for the case that a single line was inserted (the normal case in the case of clang-include-fixer). This keeps point, markers, and other buffer information intact.
* Use let-alist and association lists instead of property lists to shorten the code.
* Instead of highlighting only the first occurrence of a symbol, highlight all occurrences and move point to the closest one.
* Detect qualified names at point.
* Use filepos-to-bufferpos if available.
* Formatting.

Patch by Philipp Stephani!

llvm-svn: 283306
2016-10-05 10:04:13 +00:00
Haojian Wu 54f8efaa26 [include-fixer] Add customized editor settings documents.
Reviewers: bkramer

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D24719

llvm-svn: 282480
2016-09-27 10:43:38 +00:00
Eugene Zelenko 3ed5011d51 [Documentation] Improve consistency.
Mention Clang-rename Emacs integration in release notes.

llvm-svn: 278295
2016-08-10 22:00:49 +00:00
Alexander Kornienko 053826f146 [docs] Fix links format.
llvm-svn: 277517
2016-08-02 20:29:47 +00:00
Kirill Bobyrev 5c339ec830 fix typo in clang-rename and clang-tidy docs
llvm-svn: 276871
2016-07-27 14:26:03 +00:00
Kirill Bobyrev c4018e2db6 change Vim key binding for include-fixer and clang-rename
Change Vim key binding for include-fixer (`,cf` -> `<leader>cf`) and
clang-rename (`,cr` -> `<leader>cr`) to use `<leader>` instead of `,` like
cool Vim people (tm) do.

Reviewers: ioeric

Differential Revision: https://reviews.llvm.org/D22854

llvm-svn: 276870
2016-07-27 14:23:47 +00:00
Haojian Wu 499375ceaa [include-fixer] Update document.
llvm-svn: 276862
2016-07-27 13:17:16 +00:00
Benjamin Kramer 57d070e6fd [clang-include-fixer] Added Emacs integration for clang-include-fixer.
Patch by Jens Massberg! Thanks a lot.

Differential Revision: https://reviews.llvm.org/D22805

llvm-svn: 276853
2016-07-27 10:11:06 +00:00
Haojian Wu e64cee81bf [include-fixer] Mention more details in the document.
Reviewers: bkramer

Subscribers: Eugene.Zelenko, cfe-commits, ioeric

Differential Revision: http://reviews.llvm.org/D20467

llvm-svn: 271989
2016-06-07 07:50:48 +00:00
Eric Liu c7f3b108e2 [clang-include-fixer] Added Vim integration for clang-include-fixer.
Summary: [clang-include-fixer] Added Vim integration for clang-include-fixer.

Reviewers: hokein, bkramer

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D20329

llvm-svn: 269927
2016-05-18 14:10:16 +00:00
Benjamin Kramer a3d823336a [include-fixer] Rename XrefsDB to SymbolIndex.
It's not really containing xrefs so the name didn't fit. No functional change.

llvm-svn: 269403
2016-05-13 09:27:54 +00:00
Benjamin Kramer bfcab592ad [include-fixer] Add basic documentation.
Differential Revision: http://reviews.llvm.org/D20094

llvm-svn: 269167
2016-05-11 09:44:10 +00:00