Commit Graph

482 Commits

Author SHA1 Message Date
Jacob Dufault
26c0bfe71d Misc fixes 2017-04-17 13:40:50 -07:00
Jacob Dufault
7f4d902dcf Add alternative compile_commands.json loader using rapidjson.
It may be faster than clang. I haven't tested it yet.
2017-04-17 00:06:01 -07:00
Jacob Dufault
5e8e13380d First iteration of code completion off the main thread. Still one race condition but hopefully it shouldn't happen too often. 2017-04-16 18:22:59 -07:00
Jacob Dufault
c6dead848e Remove some TODOs, reduce output sleep from 10ms to 2ms 2017-04-16 16:57:31 -07:00
Jacob Dufault
8e18e7a8ad Add support for project filtering 2017-04-16 16:52:42 -07:00
Jacob Dufault
9d8c027cfb Set thread names. Fix initialization race condition when not using shared memory. 2017-04-16 15:48:54 -07:00
Jacob Dufault
741e357053 Remove clang-c dependency from command_line.cc 2017-04-16 14:51:47 -07:00
Jacob Dufault
c0fb407447 Cross-process support can now be disabled. 2017-04-16 14:49:48 -07:00
Jacob Dufault
5105f41f6d A little bit more IPC cleanup 2017-04-16 13:43:30 -07:00
Jacob Dufault
724d8cc3f4 Refactor ipc behind a proxy type so we can (eventually) bypass all serialization when running fully in-process. 2017-04-16 12:02:29 -07:00
Jacob Dufault
2ebaadd696 Small nits 2017-04-16 01:55:14 -07:00
Jacob Dufault
faa3cce185 Add a couple completion kinds. 2017-04-16 01:37:27 -07:00
Jacob Dufault
55f527b975 Spend time on indexer thread doing a higher quality IndexUpdate merge to reduce querydb import time 2017-04-16 01:31:28 -07:00
Jacob Dufault
04a855ebc7 Much better algorithm to sync code lens index locations to the right buffer location 2017-04-16 01:09:12 -07:00
Jacob Dufault
4dcffeb3f3 Use type safe google::dense_hash_map instantiations 2017-04-14 22:55:01 -07:00
Jacob Dufault
5109d27b87 Tons of renames (generally, Queryable -> Query, QueryableTypeDef -> QueryType, QueryableFuncDef -> QueryFunc, QueryableVarDef -> QueryVar) 2017-04-14 22:41:35 -07:00
Jacob Dufault
4135186ae2 Optimize MergeableUpdate so we don't do usr->id lookups when importing on querydb thread 2017-04-14 22:24:49 -07:00
Jacob Dufault
efcc498b79 Remove a couple stale TODOs 2017-04-14 22:15:47 -07:00
Jacob Dufault
1791f4c3b7 Refactor out FindSymbolsAtLocation 2017-04-14 22:14:05 -07:00
Jacob Dufault
c946fd1b8e Simplify code for building detailed_name 2017-04-14 22:02:03 -07:00
Jacob Dufault
f4e16067b7 Rename qualified_name to detailed_name. 2017-04-14 21:58:07 -07:00
Jacob Dufault
07c984d6c7 - Add type information to qualified_name, remove hover.
- Allow tests to automatically update their expecatations
2017-04-14 21:53:10 -07:00
Jacob Dufault
349b982f66 WIP fuzzy search 2017-04-14 18:40:01 -07:00
Jacob Dufault
9826ff193b Slightly better logging 2017-04-14 17:56:16 -07:00
Jacob Dufault
f263524b19 Fix another threading crash 2017-04-14 17:54:22 -07:00
Jacob Dufault
337c1f0b12 Fix multithread crash 2017-04-14 15:58:07 -07:00
Jacob Dufault
8f1e517c0a Small tweaks 2017-04-14 15:30:33 -07:00
Jacob Dufault
031c0c2011 Include variable type and function signature in qualified name (better outline and workspace symbol search). Also add WIP rename provider. 2017-04-14 01:21:03 -07:00
Jacob Dufault
71d1b1ffc6 Implement textDocument/documentHighlight 2017-04-13 23:43:50 -07:00
Jacob Dufault
4f770befee Support textDocument/hover (ie, hover over symbol to see type) 2017-04-13 22:18:02 -07:00
Jacob Dufault
fe0b5cb79c Cleanup / simplify the querydb import code a little 2017-04-13 19:17:15 -07:00
Jacob Dufault
103b2dac95 Fix querydb import overriding good data with bad 2017-04-13 01:31:25 -07:00
Jacob Dufault
151505dadf Add TODO to investigate index or import issue 2017-04-13 01:21:24 -07:00
Jacob Dufault
d6123bd861 Every function usage is now considered a call of that function.
This means we will now report function calls that happen in the global scope (previously, those would only show up for find all refs).
2017-04-13 00:47:47 -07:00
Jacob Dufault
7a429ed3e6 Fix global symbol search (was searching usr, should search qualified name) 2017-04-12 23:02:01 -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
94090b7b50 index stl declarations 2017-04-12 00:57:12 -07:00
Jacob Dufault
abbc6380f4 Fix indexing function call when there is implicit ctor call 2017-04-12 00:36:17 -07:00
Jacob Dufault
fdbb820d50 Fix outline and global search for pure virtual methods 2017-04-12 00:19:49 -07:00
Jacob Dufault
12a0db7d10 Don't call NormalizePath in core indexing logic; syscall dominates indexing time 2017-04-12 00:04:06 -07:00
Jacob Dufault
33c91de4c0 Fix goto definition on pure virtual methods 2017-04-11 23:41:19 -07:00
Jacob Dufault
e32adb1786 Fix 'Base' code lens on interface parent types 2017-04-11 23:30:31 -07:00
Jacob Dufault
7f4918ab15 Add "Base" code lens which jumps the editor to the base method definition. 2017-04-11 01:43:35 -07:00
Jacob Dufault
215a9a80fb - Show code lens for calls to parent and derived methods
- Don't show local variables in global symbol search
2017-04-11 00:29:36 -07:00
Jacob Dufault
91febd7343 Make goto declaration work from on a recursively defined type when used inside the type definition 2017-04-10 23:02:53 -07:00
Jacob Dufault
c9a251b7ab Goto definition intelligently jumps to declaration 2017-04-10 22:43:01 -07:00
Jacob Dufault
76b6a3d4fd Store indexed dependencies so we can reload all files when restoring from cache. Also slightly improve goto definition source range 2017-04-10 22:26:27 -07:00
Jacob Dufault
e9f0c57708 Implement textDocument/references 2017-04-09 22:34:06 -07:00
Jacob Dufault
88e0d224e3 Still pretty clunky but sort of usable 2017-04-09 17:17:49 -07:00
Jacob Dufault
527439b7c2 WIP on updating index; locations still broken 2017-04-09 17:08:54 -07:00
Jacob Dufault
43ad87ab8d Some delta tracking improvements. Still not perfect but probably good enough. Also hide refs that have been deleted in source code. 2017-04-09 15:16:06 -07:00
Jacob Dufault
6e90f8db45 Enable partial document change sync, use delta info to keep references/code lens in sync when editing 2017-04-09 12:38:52 -07:00
Jacob Dufault
3cd9ae4d16 Remove some duplicated code in workspace / document symbol creation 2017-04-08 19:48:50 -07:00
Jacob Dufault
96d5815641 cleanup code lens implementation 2017-04-08 19:31:00 -07:00
Jacob Dufault
5ebf4551b1 remove UsrRef 2017-04-08 19:27:07 -07:00
Jacob Dufault
6720a886e3 move some code out of command_line.cc 2017-04-08 19:24:32 -07:00
Jacob Dufault
c25fac0919 Make Resolve location never fail 2017-04-08 16:16:30 -07:00
Jacob Dufault
736b56d730 Remove string_db files 2017-04-08 16:12:14 -07:00
Jacob Dufault
56f0b3a90a Auto-index header files 2017-04-08 15:54:36 -07:00
Jacob Dufault
460a428ced Parse now returns a vector of unique_ptrs 2017-04-08 13:00:08 -07:00
Jacob Dufault
f0e8d0110c Add call refs from ctor context 2017-04-08 11:36:32 -07:00
Jacob Dufault
eec863da9a Small cleanup 2017-04-08 01:17:29 -07:00
Jacob Dufault
59c7d96ea7 Migrate QueryableVarDef to indicies 2017-04-08 01:07:39 -07:00
Jacob Dufault
fffb3d3fcc Migrate QueryableFuncDef to indices 2017-04-08 01:04:38 -07:00
Jacob Dufault
64d65584fd Use indexed ids for QueryTypeDef 2017-04-08 00:52:57 -07:00
Jacob Dufault
d61cc7a077 QueryableLocation now stores a file index 2017-04-08 00:21:00 -07:00
Jacob Dufault
74b1fe7194 QueryFile is now storing symbol indices directly 2017-04-08 00:11:57 -07:00
Jacob Dufault
4249fc4a38 Implement new threading model for computing index updates (prepare IdMap on querydb thread) 2017-04-07 23:45:28 -07:00
Jacob Dufault
22cc140d80 use sparsehash 2017-04-07 18:35:12 -07:00
Jacob Dufault
820a1dc093 compile-fixes 2017-04-07 17:34:13 -07:00
Jacob Dufault
6f071cfeb8 wip IdMap 2017-04-07 01:01:58 -07:00
Jacob Dufault
c5dc7a7ac7 wip towards id migration, use IdMap isntead of IdCache 2017-04-07 00:30:08 -07:00
Jacob Dufault
2d93ceb6db simplify some code, remove unused class 2017-04-07 00:12:53 -07:00
Jacob Dufault
3368065d94 remove some default ctors 2017-04-07 00:01:21 -07:00
Jacob Dufault
590797bcf2 some renames and add plan for lower mem usage 2017-04-06 23:57:26 -07:00
Jacob Dufault
443ccd24b9 limit workspace result to 1000, fix workspace file search 2017-04-06 23:38:01 -07:00
Jacob Dufault
5d451e020a rename indexer.cpp to indexer.cc 2017-04-06 23:31:29 -07:00
Jacob Dufault
6114b507e2 Drop Position support from indexer templates 2017-04-06 23:29:18 -07:00
Jacob Dufault
75b2db6dbf misc 2017-04-06 23:21:16 -07:00
Jacob Dufault
5408540158 cleanup query location usage 2017-04-06 23:20:30 -07:00
Jacob Dufault
547ef3fc3d simplify position part1 2017-04-06 23:10:17 -07:00
Jacob Dufault
69b1dcadaa cleanup some query code to prepare for space optimizations 2017-04-06 22:42:57 -07:00
Jacob Dufault
d39d204891 wip 2017-04-05 19:04:58 -07:00
Jacob Dufault
dffbec25d0 wip string cache 2017-04-05 18:52:48 -07:00
Jacob Dufault
2f61e1b4f4 normalize path in -I flag 2017-04-05 18:12:29 -07:00
Jacob Dufault
ce736c84e0 misc-linux-fixes 2017-04-05 10:41:22 -07:00
Jacob Dufault
baa7d2c8cb reenable serialize to/from tests 2017-04-05 01:30:19 -07:00
Jacob Dufault
17c3a8bf57 Update test with current index state 2017-04-05 01:29:15 -07:00
Jacob Dufault
e3058da622 Store range information in index 2017-04-05 01:06:18 -07:00
Jacob Dufault
ed8fc33cbe add basic goto-definition, lots of edge cases (need range info) 2017-04-02 19:21:21 -07:00
Jacob Dufault
ae993d6446 wip 2017-04-02 18:34:15 -07:00
Jacob Dufault
cf6456c904 add basic index cache (useful for debugging) 2017-03-30 22:30:50 -07:00
Jacob Dufault
5e7008875d unify project loading 2017-03-30 21:21:52 -07:00
Jacob Dufault
5b734e4c64 code dedup 2017-03-30 21:15:42 -07:00
Jacob Dufault
82596abc51 misc cleanup 2017-03-30 21:13:58 -07:00
Jacob Dufault
2a3ee89349 wip 2017-03-29 10:12:00 -07:00
Jacob Dufault
843a86a4a9 add asserts 2017-03-29 00:00:53 -07:00
Jacob Dufault
aef8e9267f fix crash 2017-03-28 23:40:32 -07:00
Jacob Dufault
a19d4f732f wip 2017-03-28 23:33:38 -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
4c601c4d37 wip 2017-03-27 18:47:12 -07:00
Jacob Dufault
a8a343420b misc-linux-fixes 2017-03-27 18:04:37 -07:00
Jacob Dufault
876296d62f more code completion work 2017-03-26 21:04:48 -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
d3b9743040 wip 2017-03-25 18:37:16 -07:00
Jacob Dufault
cc85f196f4 never elide data for language server json serialization 2017-03-25 17:22:06 -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
Jacob Dufault
a31ebb131c further messaging cleanups 2017-03-25 14:45:49 -07:00
Jacob Dufault
5a2acf17ab renames 2017-03-25 14:02:45 -07:00
Jacob Dufault
c4a9590398 fixes 2017-03-25 13:40:04 -07:00
Jacob Dufault
38acb8c1a1 move optional to third_party 2017-03-25 13:32:44 -07:00
Jacob Dufault
b6978b1a38 move platform init code to platform 2017-03-25 13:27:28 -07:00
Jacob Dufault
5d922a1e90 misc header cleanup 2017-03-25 13:24:42 -07:00
Jacob Dufault
695048baa7 move code into src 2017-03-25 13:15:00 -07:00
Jacob Dufault
c060e5178b ipc cleanup 2017-03-25 12:18:25 -07:00
Jacob Dufault
17c3af4d40 make enum hashable 2017-03-24 18:01:41 -07:00
Jacob Dufault
539c779606 fix some warnings 2017-03-24 17:40:01 -07:00
Jacob Dufault
6a72712404 virtual dtor out-of-line 2017-03-24 17:40:01 -07:00
Jacob Dufault
4bdf8c825b iwp 2017-03-24 00:59:47 -07:00
Jacob Dufault
0037a3e7f5 Add TypedBidiMessageQueue 2017-03-23 22:20:08 -07:00
Jacob Dufault
528d778d9a osx compile files 2017-03-21 10:06:22 -07:00
Jacob Dufault
cd4d63dd9c Small winapi fixes 2017-03-20 23:03:59 -07:00
Jacob Dufault
95f6a0df1c more format 2017-03-20 22:51:34 -07:00
Jacob Dufault
95488507a0 format, doc cleanup 2017-03-20 22:51:16 -07:00
Jacob Dufault
e7390c14f1 Cleanup new MessageQueue impl 2017-03-20 22:40:14 -07:00
Jacob Dufault
4b609c7158 wip 2017-03-19 22:43:48 -07:00
Jacob Dufault
4bd284ee7e Format 2017-03-19 15:08:36 -07:00
Jacob Dufault
4cec26ae12 WIP 2017-03-19 15:06:22 -07:00