Jacob Dufault
3b9371f4b5
Reduce STDERR logging to only WARNING and above.
...
INFO logs are now only viewable in the log file, which is not written
by default. A new command line option --log-file can be used to control
where the log file is written.
INFO logs can be written to STDERR if --log-all-to-stderr is passed.
2017-12-06 10:58:30 -08:00
Jacob Dufault
0e4148518a
Fix clang 3.8 build
2017-12-06 09:10:58 -08:00
Jacob Dufault
ae40bfa208
Add override
2017-12-06 07:10:19 -08:00
Jacob Dufault
7a5eb3c4d5
Move src/messages/*.cc to anonymous namespace
2017-12-05 21:03:38 -08:00
Jacob Dufault
b65a30c3f7
Move Ipc_* types into messages/
2017-12-05 20:41:44 -08:00
Jacob Dufault
5093863b33
Move initialization Ipc structures into messages/
2017-12-05 20:09:12 -08:00
Jacob Dufault
ad550f3f2c
Enable global/static registration for IpcMessage.
2017-12-05 20:09:12 -08:00
Jacob Dufault
9a3e040bf8
Fix clang build
2017-12-05 19:49:16 -08:00
Jacob Dufault
b441a90e0d
Finish migrating to messages/
2017-12-05 19:46:36 -08:00
Yuxuan Shui
2bd4671ddd
Only set insertTextFormat to Snippet when we have placeholders
2017-12-05 09:47:33 -08:00
Jacob Dufault
dbeb4eb511
Reformat
2017-12-05 08:24:37 -08:00
Jacob Dufault
905a4ab2b1
Make IpcId::Exit handled as a message.
2017-12-05 00:21:19 -08:00
Jacob Dufault
3599a831b1
Introduce MessageHandler abstraction. Mainly just code reorg.
...
Only the initialize request uses it so far, but this will enable pulling
quite a bit of code out of command_line.cc.
2017-12-04 23:57:41 -08:00
Fangrui Song
8b5d9d33ab
Fix LruCache when next_score overflows
2017-12-04 14:47:14 -08:00
Jacob Dufault
4a7194d2df
Remove unused variable
2017-12-04 09:18:29 -08:00
Jacob Dufault
eb8a1ee570
Fix clang build
2017-12-04 07:13:33 -08:00
Jacob Dufault
0f3680866e
Make missing clientVersion skip check
2017-12-04 00:29:38 -08:00
Jacob Dufault
670c925204
Remove Ipc_Cout; rename IpcId::Cout to IpcId::Unknown.
2017-12-04 00:16:19 -08:00
Jacob Dufault
6c5f1d9c88
Simplify IpcManager.
...
It no longer supports multi-process IPC; remove some of the extra code that was used to support that.
2017-12-04 00:13:35 -08:00
Jacob Dufault
b64b8b5493
Fix clang build
2017-12-03 22:49:50 -08:00
Jacob Dufault
9a64fb0747
Fix broken build (add lru_cache.h)
2017-12-03 19:24:42 -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
9e6d33689f
Trim lines when reading from .cquery file.
...
Otherwise there may be newlines and the like.
2017-12-03 18:25:21 -08:00
Jacob Dufault
ab7ffa302a
Add $cquery/textDocumentDidView.
...
This allows for more stable semantic highlighting, among other potential features. Requires custom support from the client, though.
2017-12-03 18:25:21 -08:00
Fangrui Song
697968b15f
Group cache files by projectRoot
2017-12-03 16:00:49 -08:00
Josh Elsasser
82643dc79d
Ensure that paths passed to libclang are fully expanded
...
- "-include" arguments must have their paths resolved
- clang_resource_dir must have its path resolved
2017-12-03 12:53:05 -08:00
Jacob Dufault
ee5ea91c1f
Reduce test clang arg set.
2017-12-01 17:11:27 -08:00
Jacob Dufault
5d1fd4ce4d
Remove a bunch of std::cerr in favor of LOG_S
2017-12-01 17:04:39 -08:00
Jacob Dufault
cf5f465e9e
Add -Wno-unknown-warning-option
2017-12-01 10:11:09 -08:00
Jacob Dufault
b727e36afc
Move cleanup_maybe_relative_path to top of func in project.cc
2017-12-01 09:59:28 -08:00
Jacob Dufault
fa240e3132
Small code cleanup in src/indexer.cc.
2017-12-01 09:57:03 -08:00
Jacob Dufault
9b44bf7901
Run ./format.sh
2017-12-01 09:55:41 -08:00
Jacob Dufault
066166ba40
Add --clang-sanity-check.
...
Does a simple index test to verify expected libclang API behavior.
2017-12-01 09:46:40 -08:00
Jacob Dufault
2a2794da23
Also log arguments when failing to create a translation unit
2017-12-01 09:46:40 -08:00
topisani
ab6c5f0515
Emit semantic highlighting for types
2017-12-01 09:42:22 -08:00
topisani
c4ada3e9df
Don't highlight operators as functions ( #104 )
...
* Don't highlight operators as functions
* address comments
2017-12-01 17:08:19 +01:00
topisani
63d2b5fa10
nitpick fixing
2017-11-30 14:12:41 -08:00
topisani
4e153784f6
Index language as enum instead of string
2017-11-30 14:12:41 -08:00
topisani
e6bcd05a7e
markdown compliant language identifiers
2017-11-30 14:12:41 -08:00
topisani
28ad5b1ed1
Index file language and send it on hover
2017-11-30 14:12:41 -08:00
Fangrui Song
eac644d81a
On *nix, use a realpath(3) variant (which does not expand symlinks) in NormalizePath
...
Before this commit, when a source file is a symlink, cquery is not able to serve LSP requests for it.
2017-11-30 11:27:26 -08:00
Jacob Dufault
38ff70ebc3
Disable serialization of clang_parseTranslationUnit2FullArgv
2017-11-29 20:23:34 -08:00
Jacob Dufault
f4acde7588
Add --log-stdin-stdout-to-stderr
...
Prints messages received and stdin/stdout to stderr. Useful when developing a new client that uses cquery as the backend.
2017-11-29 20:22:10 -08:00
Jacob Dufault
f1f2cc3bd1
Serialize clang_parseTranslationUnit2FullArgv requests.
...
Also try to emit diagnostics when translation unit creation fails.
2017-11-29 19:53:07 -08:00
Jacob Dufault
aeab1a0b79
Fix MSVC builds
2017-11-29 19:18:58 -08:00
Jacob Dufault
e421f86bfa
Try to make index tests more platform independent
2017-11-29 19:18:25 -08:00
Jacob Dufault
76c07f3cc6
Additional improvements to automatic index test updates.
2017-11-29 19:09:11 -08:00
Jacob Dufault
68f6d34693
Only wait when running index tests on windows.
2017-11-29 19:09:10 -08:00
Jacob Dufault
f6f88cc788
Better logging in when iterating files.
2017-11-29 19:09:10 -08:00
Jacob Dufault
f84945fb51
Make SafeGetLine work the same across different file-ending styles.
2017-11-29 19:09:10 -08:00