Commit Graph

1896 Commits

Author SHA1 Message Date
DJMcNab
a0e8538129 Improve comment 2018-12-23 11:10:12 +00:00
bors[bot]
d77520fde3 Merge #310
310: When constructing a crate graph, detect and forbid cycles. r=matklad a=gfreezy

fixed #300

Co-authored-by: gfreezy <gfreezy@gmail.com>
2018-12-22 14:48:18 +00:00
gfreezy
c0add813e9 mark as visited on entry instead of left 2018-12-22 22:40:41 +08:00
bors[bot]
8fed875c90 Merge #323
323: workaround salsa/parking-log bug r=matklad a=matklad

https://github.com/salsa-rs/salsa/issues/99
https://github.com/Amanieu/parking_lot/issues/101

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2018-12-22 13:47:27 +00:00
Aleksey Kladov
724862a1a4 workaround salsa/parking-log bug
https://github.com/salsa-rs/salsa/issues/99
https://github.com/Amanieu/parking_lot/issues/101
2018-12-22 16:45:57 +03:00
bors[bot]
5a5402d4d4 Merge #322
322: Fix analyzer extension fail when there are enabled any VIM extension r=matklad a=max-frai

`type` command is allowed only once to be registered and it was built specially for vim mode.
So if user has vim extension enabled, rust-analyzer initialization failes on trying to register own `type` handler.

Unfortunatelly, there are no nice ways to check if command is already registered so the way is to wrap everything with try/catch and notify user about conflict.

Co-authored-by: frai <me@maxfrai.com>
2018-12-22 13:34:04 +00:00
frai
0f5d9a0322 Fix analyzer extension fail when there are enabled any VIM extension. 2018-12-22 15:26:18 +02:00
Aleksey Kladov
5c7e8f47a8 less chatty logging 2018-12-22 15:09:08 +03:00
bors[bot]
696246af7f Merge #321
321: More useful logging r=matklad a=matklad

Try not to log *huge* messages, to make logging more useful.

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2018-12-22 09:47:54 +00:00
Aleksey Kladov
90f20f8c53 less verbose debug 2018-12-22 12:38:24 +03:00
Aleksey Kladov
94241cec04 less verbose debug for library data 2018-12-22 11:57:42 +03:00
Aleksey Kladov
2639997973 log times 2018-12-22 11:53:20 +03:00
bors[bot]
82e3ab02af Merge #320
320: completion uses hir scopes r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2018-12-22 08:01:49 +00:00
Aleksey Kladov
49e746b010 completion uses hir scopes 2018-12-22 11:01:03 +03:00
gfreezy
0267df3815 not visit the same crateId only once 2018-12-22 15:30:58 +08:00
bors[bot]
4e4ca27eab Merge #319
319: Completion icons r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2018-12-21 23:28:47 +00:00
Aleksey Kladov
ea763c73b8 fix snippet icon 2018-12-22 02:28:09 +03:00
Aleksey Kladov
498e3a6846 binding icon 2018-12-22 02:24:59 +03:00
Aleksey Kladov
8e056ef042 debug pring 2018-12-22 02:23:25 +03:00
Aleksey Kladov
97cb463c9b moar icons 2018-12-22 02:20:14 +03:00
bors[bot]
e4d0930d9c Merge #316
316: Fix handling of nested self in paths r=matklad a=DJMcNab

See https://github.com/rust-analyzer/rust-analyzer/issues/231#issuecomment-442449505.

Co-authored-by: DJMcNab <36049421+djmcnab@users.noreply.github.com>
2018-12-21 23:19:14 +00:00
Aleksey Kladov
238b52358d more icons 2018-12-22 02:03:18 +03:00
DJMcNab
bb1ee2f13a Move the self handling from directly inside the loop 2018-12-21 23:01:16 +00:00
Aleksey Kladov
f1f2804c71 move completion items to conv 2018-12-22 01:59:32 +03:00
bors[bot]
f2581a4a29 Merge #318
318: Remove a completed and an unactionable todo r=matklad a=DJMcNab



Co-authored-by: DJMcNab <36049421+djmcnab@users.noreply.github.com>
2018-12-21 22:48:57 +00:00
DJMcNab
1dffbe5c37 Remove TODO on self_hosting_parsing
This improving this code is not a good use of people-time, and this
might be the most performant approach nonwithstanding
an api for this use case being added to walkdir
2018-12-21 22:44:31 +00:00
Aleksey Kladov
328d123f5b specify completion item kind 2018-12-22 01:42:26 +03:00
Aleksey Kladov
284e894069 cleanup 2018-12-22 01:42:26 +03:00
Aleksey Kladov
25dda42f37 introduce ComletionItemKind 2018-12-22 01:42:26 +03:00
Aleksey Kladov
ebb584ce66 rename completion kind 2018-12-22 01:42:26 +03:00
DJMcNab
4dbf71d332 Remove uneeded todo in lexer 2018-12-21 22:41:09 +00:00
DJMcNab
d8d60215da Fix handling of nested self in paths 2018-12-21 22:29:59 +00:00
bors[bot]
184665ff9b Merge #315
315: Split completion into manageable components r=matklad a=matklad

The main idea here is to do completion in two phases:

* first, we figure out surrounding context
* then, we run a series of completers on the given context. 

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2018-12-21 22:04:32 +00:00
Aleksey Kladov
2ae87ffc9a cleanup 2018-12-22 01:03:58 +03:00
Aleksey Kladov
a8e04a7028 docs 2018-12-22 01:01:40 +03:00
Aleksey Kladov
200cc0a1e3 rename tests 2018-12-22 00:55:20 +03:00
Aleksey Kladov
ccca5aae43 scope-based copmletions on original file 2018-12-22 00:52:02 +03:00
Aleksey Kladov
2136e75c0b move path completion to a separate component 2018-12-21 23:04:56 +03:00
Aleksey Kladov
2351308d92 remove explicit serde_derive 2018-12-21 22:39:59 +03:00
Aleksey Kladov
67ac0a423f join lines collapses use_trees 2018-12-21 21:06:01 +03:00
Aleksey Kladov
cbe67339df more completion components 2018-12-21 20:55:00 +03:00
bors[bot]
a106784115 Merge #313
313: Fix where clauses using fully qualified path syntax r=matklad a=DJMcNab

Fixes #311.

Co-authored-by: DJMcNab <36049421+djmcnab@users.noreply.github.com>
2018-12-21 17:31:43 +00:00
Aleksey Kladov
c2bf174e9c Start splitting completion into components 2018-12-21 20:25:29 +03:00
DJMcNab
bd5a358910 Fix where clauses using fully qualified path syntax 2018-12-21 17:20:38 +00:00
DJMcNab
380733d6d0 Undo the previous mistaken change and make publish_decorations optional
See https://github.com/Microsoft/language-server-protocol/issues/567
for motivations to not require `InitializationOptions`

TODO: Check if there are any other protocol extensions
which should be disabled if not implemented on the client
2018-12-21 17:00:31 +00:00
Aleksey Kladov
e086cc8db5 hide empty changes 2018-12-21 19:13:26 +03:00
Aleksey Kladov
12810b93c5 wip 2018-12-21 19:10:07 +03:00
Aleksey Kladov
9de3a45be6 add tests for pd 2018-12-21 18:53:00 +03:00
Aleksey Kladov
a5987bd715 show debug repr of literals 2018-12-21 18:49:52 +03:00
bors[bot]
0dcea10616 Merge #312
312: Completion refactoring r=matklad a=matklad

Just a usual refactoring, turning a rather ad-hoc completion infra into something extensible

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2018-12-21 15:14:34 +00:00