Kirill Bulatov
5b7d928075
Enforce the located imports' order
2021-03-08 23:59:20 +02:00
Kirill Bulatov
24a5d3b19d
Fix the completion labels and tests
2021-03-08 23:59:20 +02:00
Kirill Bulatov
33c83e72b9
Work towards better import labels
2021-03-08 23:59:20 +02:00
Kirill Bulatov
4d4ac1d4fa
Profile import_assets better
2021-03-08 23:59:20 +02:00
Kirill Bulatov
e214c3a6bd
Simplify
2021-03-08 23:59:20 +02:00
Kirill Bulatov
e74c55bb4a
Refactor the import location
2021-03-08 23:59:20 +02:00
Kirill Bulatov
89d410cef5
Do not propose already imported imports
2021-03-08 23:59:20 +02:00
Kirill Bulatov
9482353fa8
Properly handle turbofishes in qualifiers
2021-03-08 23:59:20 +02:00
Kirill Bulatov
d386481fac
Fix some tests
2021-03-08 23:59:20 +02:00
Kirill Bulatov
582cee2cdf
Return more data about located imports
2021-03-08 23:59:18 +02:00
Kirill Bulatov
309421c117
Draft the qualifier import resolution
2021-03-08 23:58:48 +02:00
Kirill Bulatov
c395c3311d
Filter out path items by the qualifier
2021-03-08 23:58:33 +02:00
Kirill Bulatov
f08c0cdd2a
Simplify
2021-03-08 23:58:33 +02:00
Kirill Bulatov
7584260b9a
Find the code to change
2021-03-08 23:58:33 +02:00
Kirill Bulatov
005bc49d74
Test and initial refactoring
2021-03-08 23:58:32 +02:00
Laurențiu Nicola
fc9eed4836
Use upstream cov-mark
2021-03-08 22:19:44 +02:00
asv
96fc01a30b
Make group imports configurable
2021-03-07 10:15:17 +02:00
Lukas Wirth
8d305680e6
Show docs on hover for keywords and primitives
2021-03-02 14:41:01 +01:00
Vincent Esche
c4e2f32d73
Fixed remaining references to AnalysisChange
(now: Change
)
...
(The type was renamed/moved in 8716c4cec3
)
2021-02-28 12:57:41 +01:00
lbrande
9db970ee08
De Morgan's Law assist now correctly inverts <, <=, >, >=.
2021-02-24 11:58:37 +01:00
Lukas Wirth
9e8f4d31a4
Pickup ConstReference patterns in FindUsages
2021-02-23 23:31:53 +01:00
Lukas Wirth
e52bdc55ef
Implement ast::AstNode for NameLike and move it to node_ext
2021-02-16 19:27:08 +01:00
Jonas Schievink
50d18eb0a6
Use cfg(target_arch)
instead of a Cargo feature
...
Not that WASM works right now anyways...
2021-02-16 18:50:06 +01:00
bors[bot]
c9672a0539
Merge #7657
...
7657: utf8 r=matklad a=matklad
- Prepare for utf-8 offsets
- reduce code duplication in tests
- Make utf8 default, implement utf16 in terms of it
- Make it easy to add additional context for offset conversion
- Implement utf8 offsets
closes #7453
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-02-16 16:34:22 +00:00
Aleksey Kladov
95209aa3f8
Make utf8 default, implement utf16 in terms of it
2021-02-16 19:17:32 +03:00
Aleksey Kladov
00cc778c8c
reduce code duplication in tests
2021-02-16 19:17:32 +03:00
Aleksey Kladov
2cb4ac9eb4
Prepare for utf-8 offsets
2021-02-16 19:17:32 +03:00
kjeremy
f9bb398cc5
Fix a few clippy::perf warnings
2021-02-16 10:55:34 -05:00
Lukas Wirth
403a63d2b4
Don't classify attribute macros as their path unless it's a function with the proc_macro_attribute attribute
2021-02-13 22:11:31 +01:00
Lukas Wirth
c5be0b2589
Use NameLike in FileReference directly as its not exported from ide anymore
2021-02-12 18:58:29 +01:00
Lukas Wirth
d644728d82
Refactor reference searching to work with the ast
2021-02-12 18:58:28 +01:00
Jonas Schievink
5d99ba1d9a
Make ModPath
's representation private
2021-02-04 20:49:24 +01:00
Aleksey Kladov
d35bda6429
Make always-assert crate reusable
2021-01-26 22:13:42 +03:00
bors[bot]
3a5cd6bbc6
Merge #7406
...
7406: if_let_match: don't assume happy path r=matklad a=bugadani
Closes #7392
Co-authored-by: Dániel Buga <bugadani@gmail.com>
2021-01-26 12:12:45 +00:00
Lukas Wirth
a872ebf81f
Support unions in symbol search
2021-01-24 01:32:52 +01:00
Dániel Buga
24f0cd8293
replace_if_let_with_match: don't assume sad pattern
2021-01-22 23:29:51 +01:00
bors[bot]
0c37b3a0fc
Merge #7353
...
7353: Add LifetimeParam and ConstParam to CompletionItemKind r=matklad a=Veykril
Adds `LifetimeParam` and `ConstParam` to `CompletionItemKind` and maps them both to `TypeParam` in the protocol conversion as there are no equivalents, so nothing really changes there.
`ConstParam` could be mapped to `Const` I guess but I'm split on whether that would be better?
Additions were solely inspired by (the single) test output for const params.
Also sorts the variants of `CompletionItemKind` and its to_proto match.
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-01-22 15:31:47 +00:00
Jonas Schievink
896dfacfc4
Add name resolution query for block expressions
2021-01-21 15:22:17 +01:00
Jonas Schievink
82146737ac
Treat BlockExpr as a potential module origin
2021-01-20 20:05:48 +01:00
Lukas Wirth
f2cb7dbcb7
Partially unify SymbolKind and CompletionItemKind
2021-01-20 18:39:46 +01:00
Jonas Schievink
0587b99fde
Make public DefMap fields private
2021-01-20 15:41:18 +01:00
Lukas Wirth
563a175fdb
Move SymbolKind to ide_db
2021-01-20 15:25:34 +01:00
Aleksey Kladov
46b4f89c92
.
2021-01-20 01:56:11 +03:00
bors[bot]
342bf41022
Merge #7297 #7338
...
7297: Propose trait associated items and autoimport traits on completion r=matklad a=SomeoneToIgnore
![trait_imports](https://user-images.githubusercontent.com/2690773/104819998-6faeb480-583a-11eb-8b45-b7351b51b90e.gif )
Closes #7248
7338: Parse `impl const Trait` r=Veykril a=Veykril
Closes #7313
bors r+
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-01-18 19:40:11 +00:00
bors[bot]
9daba961f2
Merge #7291
...
7291: Wrap remaining self/super/crate in Name{Ref} r=matklad a=Veykril
That should be the remaining special casing for `self` 🎉
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-01-18 16:13:06 +00:00
bors[bot]
9eb37fbdeb
Merge #7292
...
7292: Swap assert_eq_text\!(expected, actual) r=matklad a=u5surf
Fixes #7283
Swap assert_eq_text parameters in the order (expected, actual)
Co-authored-by: yugo-horie <u5.horie@gmail.com>
2021-01-18 10:12:54 +00:00
Kirill Bulatov
09c11054a1
Do trait solving in batch
2021-01-17 02:57:38 +02:00
Kirill Bulatov
68626e4ef5
Draft the working completion
2021-01-17 02:57:34 +02:00
Kirill Bulatov
db335a1bbf
Add flyimport completion for trait assoc items
2021-01-16 20:44:12 +02:00
Kirill Bulatov
6742f38e49
Share import_assets and related entities
2021-01-16 19:33:36 +02:00