Commit Graph

48 Commits

Author SHA1 Message Date
Jacob Dufault
9dde5041cb Always use -fparse-all-comments 2017-12-27 07:56:17 -08:00
Fangrui Song
af5ae31c34 Don't emit more diagnostics after hitting -ferror-limit 2017-12-23 15:20:13 -08:00
Fangrui Song
c04c9fa750 Don't emit more diagnostics after hitting -ferror-limit 2017-12-23 15:08:47 -08:00
Jacob Dufault
fb491e6c6d Format using clang format 4.0.0 2017-12-23 08:33:26 -08:00
Walter Erquinigo
5238c50027 objc 2017-12-15 12:02:32 -08:00
Jacob Dufault
12bfabf9c2 No more NonElidedVector 2017-12-11 21:20:29 -08:00
Jacob Dufault
4a7ca6168f Reformat 2017-12-07 11:54:51 -08:00
Yuxuan Shui
93fb746992 Convert priority to a string properly for sortText
Cast the number to a char directly sometimes results in a invalid UTF-8
string, which is not good for some clients.
2017-12-07 10:38:43 -08:00
Jacob Dufault
b65a30c3f7 Move Ipc_* types into messages/ 2017-12-05 20:41:44 -08:00
Yuxuan Shui
2bd4671ddd Only set insertTextFormat to Snippet when we have placeholders 2017-12-05 09:47:33 -08:00
Jacob Dufault
b2736f8822 Semantic highlighting improvements.
- Semantic highlighting no longer disappears when switching between
files.
- Semantic highlighting for a symbol will remain stable as the file is
edited.
- Improved semantic highlighting colors.

Progress indicator also now shows the number of remaining index jobs
(not the total number).
2017-12-03 18:25:21 -08:00
Jacob Dufault
9b44bf7901 Run ./format.sh 2017-12-01 09:55:41 -08:00
Jacob Dufault
97417ecc93 Reformat code 2017-11-19 14:11:54 -08:00
Daan De Meyer
5842dd5d60 Add option to disable insertion of snippets when completing a method/function call. 2017-11-19 10:30:29 -05:00
Peter Goodman
3f45c05476 This commit fixes severak compiler errors when trying to build cquery. I gave up after a bit and didn't fix them all though, there are a ton of signed to unsigned comparisons. 2017-11-18 16:09:14 -05:00
Jacob Dufault
601af73ca9 Move all libclangmm/* files into src/* directory 2017-11-11 11:41:09 -08:00
Jacob Dufault
7d549f3fdf Move libclangmm/Utility.h into clang_utils.h 2017-11-04 16:02:39 -07:00
Jacob Dufault
0d091b69cf Minor style fix 2017-10-23 08:39:33 -07:00
Jacob Dufault
d145bcebc5 Fix completion issue where completing dropped completion session. 2017-10-23 08:38:01 -07:00
Jacob Dufault
76cc110cc2 Simplify completion session management code. 2017-10-23 00:28:21 -07:00
Jacob Dufault
3e9cffcc62 Cleanup clang::TranslationUnit API so callers have to handle failures. 2017-10-22 22:07:50 -07:00
Jacob Dufault
9429dff63a Try to only ever have one completion session per file. 2017-10-22 21:49:17 -07:00
Jacob Dufault
a155f5b686 Fix a bunch of bugs in argument handling and address some TODOs 2017-10-18 01:24:52 -07:00
Jacob Dufault
a6807dcb8c Remove issue where diagnostics would disappear file saves.
Also allow rebuilding of completion session by closing and reopening a
file.
2017-10-17 11:43:33 -07:00
Jacob Dufault
6704049e13 Disable real-time indexing.
It adds a bit too much latency to code completion. I suspect this can
be removed by running real-time indexing in a separate thread (though
this will require a dedicated CXTranslationUnit instance).
2017-09-27 13:44:54 -07:00
Jacob Dufault
7531a0b4e5 Real-time indexing as you type. 2017-09-26 23:03:43 -07:00
Jacob Dufault
511bbbe391 Add TODO 2017-09-21 23:48:05 -07:00
Jacob Dufault
5704ef5077 Cleanup completion logging. Also don't mark isIncomplete for completion results as aggressively. 2017-09-21 19:45:17 -07:00
Jacob Dufault
772f547065 Update diagnostics on document change, not code completion.
This also changes the API used for reporting diagnostics, which will hopefully be more reliable. This requires reparsing the document, though, so it is much slower. We do this after reporting code completion though, so hopefully the performance delay is not too noticable.
2017-09-21 19:25:33 -07:00
Jacob Dufault
f5314b62b1 Reformat to Chromium style. 2017-09-21 18:14:57 -07:00
Jacob Dufault
64580decab Push cursor position to end when updating delayed diagnostics 2017-07-19 00:20:19 -07:00
Jacob Dufault
57e5fe1814 Fix crash 2017-07-17 13:03:42 -07:00
Jacob Dufault
ba973ba1bf Remove unused variables 2017-07-17 10:41:59 -07:00
Jacob Dufault
22bb89fca1 Add options to turn off diagnostics.
diagnostics.onParse: semi-real time diagnostics that reported when a file is indexed or prepared for code completion
diagnostics.onCodeComplete: real time diagnostics that are reported as you type
2017-07-15 17:25:52 -07:00
Jacob Dufault
152e98363f Refresh diagnostics 5 seconds after the last code completion. 2017-07-15 17:08:07 -07:00
Jacob Dufault
00e452272f Do not use clang_Location_isInSystemHeader for diagnostics; causes crashes 2017-07-12 15:02:48 -07:00
Jacob Dufault
aae126f899 Disable diagnostics during code completion (causes crashes) 2017-07-12 11:34:05 -07:00
Jacob Dufault
dde1c687ec Build diagnostics during code completion 2017-07-12 11:26:08 -07:00
Jacob Dufault
d1cbc32c81 Hopefully fix completion crashes.
It was caused due to a multithreading race. A vector was assigned to twice at the same time, which caused a crash in the destructor.
2017-06-29 23:51:22 -07:00
Jacob Dufault
808e0f5277 Fix clang build 2017-06-29 10:30:22 -07:00
Jacob Dufault
f498f0ccb1 Fix showing duplicate completion entries, always provide insertText. 2017-06-28 23:59:38 -07:00
Jacob Dufault
85ec4b9843 Use shared_ptr in command_line for completion data.
Also add thread exit logs so to check if the stack has gone away.
2017-06-28 21:59:16 -07:00
Jacob Dufault
706479aded Completion changes (maybe fix some crashes) 2017-06-28 19:50:30 -07:00
Jacob Dufault
84b7ec930b Log completion session creation/destruction. Ensure $0 is at end of insert text for final tab stop. 2017-06-13 23:15:18 -07:00
Jacob Dufault
64253ec174 Use shared_ptr in a couple more spots. 2017-06-09 21:15:33 -07:00
Jacob Dufault
dec484ed0d Only report diagnostics from code completion document parse.
Also use shared_ptr, hopefully fix memory crashes.
2017-06-09 21:13:16 -07:00
Jacob Dufault
c262e1674d Misc fixes 2017-06-09 18:02:48 -07:00
Jacob Dufault
7b790e7da3 Fix file name typo 2017-05-29 14:21:08 -07:00