Fangrui Song
162f995344
Better deserialization error messages
2018-01-19 00:14:47 -08:00
Fangrui Song
556f32ec1b
Throw std::invalid_argument for deserialization type error
2018-01-18 22:47:44 -08:00
Fangrui Song
159b0b968d
Fix ReadCharFromStdinBlocking
2018-01-15 00:00:29 -08:00
Fangrui Song
96a23bc573
Better shutdown
2018-01-14 22:53:51 -08:00
Fangrui Song
27ddce4cd6
Reader reflection of std::variant<Ts...>
2018-01-10 23:17:27 -08:00
Fangrui Song
a8d403426d
using lsRequestId = std::variant<std::monostate, int64_t, std::string>;
...
Emacs lsp-mode uses (gethash "id" json-data) to handle asynchronous
requests. The JavaScript `Number` type is really a hindrance.
2018-01-10 10:45:31 -08:00
Fangrui Song
a8aa94d4ba
Fix build
2018-01-10 00:15:58 -08:00
Fangrui Song
060b92b214
Change lsVersionedTextDocumentIdentifier::version to variant<monostate,int>
...
version: number | null
Maybe we need to change it to double
2018-01-09 23:57:44 -08:00
Fangrui Song
503127e0da
Reflect std::variant and change lsRequestId to variant<monostate,double,string> ( #279 )
2018-01-09 22:34:58 -08:00
Fangrui Song
60e384a859
Make semantic highlighting symbol ranges non-overlapping using a scan line algorithm
2018-01-09 20:24:54 -08:00
Fangrui Song
11436c1f0d
Flatten msgpack by replacing pack_array() with pack()
...
msgpack::unpacker is not a complete streaming deserializer. It returns maps/arrays as a whole but does not allow us to step into individual elements. There is some memory overhead and it is also likely less efficient. By flattening maps, we also no longer need to track how many fields a struct has, which is less error-prone.
2018-01-07 20:52:16 -08:00
Fangrui Song
fe0313f0b5
Add a parameter (number of __VA_ARGS__) to REFLECT_MEMBER_START
...
rapidjson StartArray StartObject do not need the number of fields, but msgpack-c does.
2018-01-06 16:42:22 -08:00
Fangrui Song
02a457f65d
Make Reader/Writer abstract classes instead of type aliases of rapidjson classes
...
Added src/serializers/json.h (which includes rapidjson)
2018-01-06 14:47:43 -08:00
Fangrui Song
1220463efe
Make GetPath less hacky for #215
2018-01-02 18:59:47 -08:00
Peter Elmers
177e4cd224
Escape more symbols in path handling.
2017-12-11 11:11:02 -08:00
Jacob Dufault
b65a30c3f7
Move Ipc_* types into messages/
2017-12-05 20:41:44 -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
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
Peter Elmers
750cc4ea30
Respond to comment
2017-11-26 12:12:59 -05:00
Jacob Dufault
97417ecc93
Reformat code
2017-11-19 14:11:54 -08:00
Fangrui Song
297ed1d13e
Use indented TEST_SUITE
2017-11-19 14:13:11 -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
eea8a1b07a
Try to avoid crashing when deserializing JSON
2017-11-18 09:27:37 -08: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
104cfd167c
Fix linux build
2017-09-13 10:53:13 -07:00
Jacob Dufault
17565f9a14
Make some good progress on e2e tests.
2017-09-12 20:35:53 -07:00
Jacob Dufault
f498f0ccb1
Fix showing duplicate completion entries, always provide insertText.
2017-06-28 23:59:38 -07:00
Jacob Dufault
41d8cd9a0c
Fix memory leaks
2017-06-08 23:22:00 -07:00
Jacob Dufault
8910d0a13e
Fix warnings (almost all numeric cast-related)
2017-05-21 16:22:00 -07:00
Jacob Dufault
866faed4fc
Exit when there is no more stdin input
2017-05-18 18:13:51 -07:00
Jacob Dufault
3001faf9a8
Signature help and snippets for code completion
2017-05-15 00:29:22 -07:00
Jacob Dufault
1b4f377682
WIP but basic test e2e test running
2017-05-02 23:45:10 -07:00
Jacob Dufault
bdd433abd4
Fix vscode complaining about overlapping text edits for rename
2017-04-20 23:56:42 -07:00
Jacob Dufault
8e18e7a8ad
Add support for project filtering
2017-04-16 16:52:42 -07:00
Jacob Dufault
71d1b1ffc6
Implement textDocument/documentHighlight
2017-04-13 23:43:50 -07:00
Jacob Dufault
d5e5d96a9e
- Slightly more robust file parsing
...
- Make memory ownership slightly clearer in indexer
2017-04-12 23:01:42 -07:00
Jacob Dufault
e3058da622
Store range information in index
2017-04-05 01:06:18 -07:00
Jacob Dufault
843a86a4a9
add asserts
2017-03-29 00:00:53 -07:00
Jacob Dufault
cf1012b98c
small fixes
2017-03-27 22:27:06 -07:00
Jacob Dufault
9ac960109f
wip
2017-03-27 19:35:27 -07:00
Jacob Dufault
404b853d6f
code completion works (but is still blocking)
2017-03-26 14:40:34 -07:00
Jacob Dufault
7ffdf77b99
textDocument/open close edit, WIP code completion
2017-03-25 23:47:59 -07:00
Jacob Dufault
c8afc0f022
more changes
2017-03-25 16:58:11 -07:00
Jacob Dufault
8219a39a32
move some things into language_server_api.cc
2017-03-25 15:13:19 -07:00
Jacob Dufault
68938bc3df
renames
2017-03-25 14:57:06 -07:00