Commit graph

8184 commits

Author SHA1 Message Date
Edwin Cheng
c7b0c72dd7 Fix whitespace in tests 2020-03-05 00:12:39 +08:00
Edwin Cheng
6794d50a9b Fixed whitespace bug 2020-03-04 23:41:14 +08:00
Edwin Cheng
028595548b Fix #3436 2020-03-04 23:41:14 +08:00
Edwin Cheng
e76dddd610 Add more log 2020-03-04 23:41:04 +08:00
bors[bot]
94189d0a1c
Merge #3442
3442: Skip self param when completing methods r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-03-04 12:02:06 +00:00
Aleksey Kladov
7d2ddfd3c8 Skip self param when completing methods 2020-03-04 13:01:16 +01:00
bors[bot]
02b02061b6
Merge #3440
3440: Move search to ra_ide_db r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-03-04 11:49:24 +00:00
Aleksey Kladov
4f50a37187 Fix docs 2020-03-04 12:48:50 +01:00
Aleksey Kladov
98d68fa6be Cleanup API 2020-03-04 12:46:40 +01:00
Aleksey Kladov
072ec1a8ae Fix tests 2020-03-04 12:24:28 +01:00
Aleksey Kladov
994000b5dd Use method instead of a free function 2020-03-04 12:22:47 +01:00
Aleksey Kladov
e839d793ae Drop one once_cell dep 2020-03-04 12:22:47 +01:00
Aleksey Kladov
f79719b8ae Move find_refs_to_def 2020-03-04 12:22:47 +01:00
Aleksey Kladov
2638bec66c Merge refs_to_def and process_def 2020-03-04 12:22:06 +01:00
Aleksey Kladov
1874b6738a Move ReferenceKind 2020-03-04 12:22:06 +01:00
Aleksey Kladov
a549da7e3e Move SearchScope 2020-03-04 12:22:06 +01:00
bors[bot]
66ec6bdfb0
Merge #3432
3432: Feature/snippet completions r=matklad a=iTZAvishay

This PR implements #1705 and is based on #3430 to avoid future conflicts.

The completions are placing default values with the names of the parameters, demo: 
![call_me_demo](https://user-images.githubusercontent.com/5567310/75828341-461ca400-5db4-11ea-88d8-88e59ac1a197.gif)


Co-authored-by: Avishay Matayev <me@avishay.dev>
2020-03-04 11:05:14 +00:00
bors[bot]
79d05aacd8
Merge #3438
3438: Remove stray FIXME r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-03-04 10:56:11 +00:00
Aleksey Kladov
5095573139 Remove stray FIXME 2020-03-04 11:55:25 +01:00
Aleksey Kladov
19115e9fab Support cross-crate marks 2020-03-04 11:55:25 +01:00
Avishay Matayev
fb34a5ba06 Support function's completion snippet
Note that `detail` was replced with `function_signature` to avoid
calling `from` on FunctionSignature twice.

I didn't add new tests because the current ones seem enough.
2020-03-04 11:03:32 +02:00
bors[bot]
437329d3f5
Merge #3429
3429: Fix panic on eager expansion r=matklad a=edwin0cheng

When lazy expanding inside an eager macro, its *parent* file of that lazy macro call must be already exists such that a panic is occurred because that parent file is the eager macro we are processing.

This PR fix this bug by store the argument syntax node as another eager macro id for that purpose.

Personally I don't know if it is a good answer for this bug. 




Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2020-03-04 00:05:10 +00:00
bors[bot]
ce69561be3
Merge #3430
3430: Fix completion snippet for reexported functions r=matklad a=flodiebold

Fixes #3356.

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2020-03-03 23:12:27 +00:00
Florian Diebold
e55fc286fc Fix completion snippet for reexported functions
Fixes #3356.
2020-03-03 20:49:50 +01:00
Edwin Cheng
5ea83fee01 Fixed a typo in comment 2020-03-04 02:57:54 +08:00
Edwin Cheng
e04c0f4222 Fix panic on eager expansion 2020-03-04 02:41:33 +08:00
bors[bot]
5abc45982b
Merge #3428
3428: Move reference classification to ra_ide_db r=matklad a=matklad

Lost some marks along the way :-(



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-03-03 17:55:25 +00:00
Aleksey Kladov
53cab1cd21 Fix imports 2020-03-03 18:54:39 +01:00
Aleksey Kladov
177229bfde Move reference classification to ra_ide_db
Lost some marks along the way :-(
2020-03-03 18:50:15 +01:00
bors[bot]
074474fe00
Merge #3427
3427: Rename NameDefinition -> Definition r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-03-03 17:41:25 +00:00
Aleksey Kladov
34d6e22fc1 Actually include readme into .vsix 2020-03-03 18:40:27 +01:00
Aleksey Kladov
d49a4d1863 Rename NameDefinition -> Definition 2020-03-03 18:40:27 +01:00
bors[bot]
7a322f9aff
Merge #3392
3392: Implement concat eager macro  r=matklad a=edwin0cheng

This PR implements the following things:

1. Add basic eager macro infrastructure by introducing `EagerCallId` such that the new `MacroCallId` is defined as :

```
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum MacroCallId {
    LazyMacro(LazyMacroId),
    EagerMacro(EagerMacroId),
}
```

2. Add `concat!` builtin macro.




Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2020-03-03 17:30:08 +00:00
Edwin Cheng
4d5e80c6c8 Fix for rebasing 2020-03-04 01:24:33 +08:00
bors[bot]
13b25d73b5
Merge #3426
3426: Refactor reference search a bit r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-03-03 17:23:39 +00:00
Aleksey Kladov
7d71cc72b5 Refactor reference search a bit 2020-03-03 18:22:52 +01:00
Edwin Cheng
1e9a3233f7 Move pub function first 2020-03-04 01:21:14 +08:00
Edwin Cheng
02b865019b Add doc about eager expansion name resolution 2020-03-04 01:21:14 +08:00
Edwin Cheng
fe04c28b59 Add test 2020-03-04 01:21:14 +08:00
Edwin Cheng
1465cc0c4f Implement concat macro 2020-03-04 01:21:14 +08:00
Edwin Cheng
0d55454073 Add LazyMacroId 2020-03-04 01:21:14 +08:00
bors[bot]
cebb995d21
Merge #3425
3425: Fix a bug for single dollar sign macro r=matklad a=edwin0cheng

This PR fixed a bug to allow the following valid `macro_rules!` :

```rust
macro_rules! m {
    ($) => ($)
}
```

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2020-03-03 17:07:27 +00:00
Edwin Cheng
3dc3d9d18f Fix a bug for single dollar sign macro 2020-03-04 01:03:44 +08:00
bors[bot]
674770ef04
Merge #3422
3422: Add profile call r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-03-03 16:17:38 +00:00
Aleksey Kladov
2ff2c29a1e Add profile call 2020-03-03 17:11:25 +01:00
bors[bot]
9451d9f05b
Merge #3424
3424: Highlight assist tests r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-03-03 16:10:55 +00:00
Aleksey Kladov
cf0ececb7a Highlight assist tests 2020-03-03 17:03:46 +01:00
Aleksey Kladov
1cca6b2a3d Fix applicability of inline local 2020-03-03 16:56:42 +01:00
bors[bot]
077f8ac02c
Merge #3423
3423: Remove stray dbg r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-03-03 15:52:56 +00:00
Aleksey Kladov
8f3677a94a Remove stray dbg 2020-03-03 16:41:52 +01:00