Commit graph

1429 commits

Author SHA1 Message Date
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
Aleksey Kladov
45232dfa68 organize completion tests better 2018-12-21 18:13:21 +03:00
gfreezy
66d15bb2da add #[cfg(test)] 2018-12-21 22:45:38 +08:00
gfreezy
77eaa208ed rename to dfs_find 2018-12-21 22:30:41 +08:00
gfreezy
792dabc0a6 When constructing a crate graph, detect and forbid cycles.
fixed #300
2018-12-21 22:27:04 +08:00
Aleksey Kladov
d4ef07b235 use completions in API 2018-12-21 15:50:07 +03:00
Aleksey Kladov
ba0072401c use Completions to collect completions 2018-12-21 15:46:01 +03:00
Aleksey Kladov
052e20162a docs 2018-12-21 15:34:11 +03:00
Aleksey Kladov
0ce82516c1 introduce Completions 2018-12-21 15:32:29 +03:00
Aleksey Kladov
4092b8d0b5 make compleion item details private 2018-12-21 15:19:46 +03:00
Aleksey Kladov
b5c5995bf1 use builder interface for completion item 2018-12-21 14:38:41 +03:00
Aleksey Kladov
b0ff6176ed flip params 2018-12-21 14:02:51 +03:00
Aleksey Kladov
74406ca8ea introduce completion_item module 2018-12-21 14:02:14 +03:00
bors[bot]
463e5af3f2 Merge #306
306: Finish weird exprs r=DJMcNab a=DJMcNab

Fix #290.

Note that I'm not certain my use of `p.nth(1) == Ident` is entirely consistent with `libsyntax` - in the original, [`is_union_item`](9622f9dc47/src/libsyntax/parse/parser.rs (L4593-L4596)) uses `t.is_ident() && !t.is_reserved_ident()`, whereas we effectively only do `is_ident`. However, I cannot find the definition of `is_reserved_ident` (even searching the rust repository only gives uses, no definitions), so this will have to do unless someone else can find it :|.

Co-authored-by: DJMcNab <36049421+djmcnab@users.noreply.github.com>
2018-12-21 10:04:00 +00:00
DJMcNab
9beee92500 Add comment about the source of the weird_exprs test 2018-12-21 10:03:02 +00:00
bors[bot]
4f7ec01703 Merge #309
309: Fix edits r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2018-12-21 09:33:45 +00:00
Aleksey Kladov
fd927ea3a9 use root-relative paths 2018-12-21 12:30:28 +03:00
Aleksey Kladov
b5b44659a4 edits use source-root API 2018-12-21 12:18:14 +03:00