Edwin Cheng
4520002b63
Unleash macro 2.0 in hightlight and more
2021-03-27 14:42:49 +08:00
cynecx
5ff3299dd6
syntax: return owned string instead of leaking string
2021-03-26 18:30:59 +01:00
Jonas Schievink
4781479ab2
Sweep the new TraitEnvironmentQuery
2021-03-24 18:59:35 +01:00
Lukas Wirth
395183e0b7
Cleanup Definition::search_scope
2021-03-23 13:03:55 +01:00
Lukas Wirth
7c4eb66c1a
Merge hir::MacroDef::is_* into hir::MacroDef::kind
2021-03-23 11:32:14 +01:00
Lukas Wirth
bad4e48672
Set up a search scope when searching for mbe macro references
2021-03-23 11:32:10 +01:00
Aleksey Kladov
45a8f37b6a
Compute more mathematically well-rounded notion of transitive deps
...
By including the crate itself, we make the resulting set closed with
respect to `transitve_reveres_dependencies` operation, as it becomes a
proper transitive closure. This just feels more proper and mathy.
And, indeed, this actually allows us to simplify call sites somewhat.
2021-03-23 12:49:55 +03:00
Aleksey Kladov
9cbf09ec4f
rewrite merge use trees assist to use muatable syntax trees
...
changelog internal
2021-03-22 20:47:46 +03:00
Edwin Cheng
7784cadc3d
Reexport PrefixKind to remove deps to hir
2021-03-22 13:39:13 +08:00
Kirill Bulatov
b17d99c070
Fix the profile string
2021-03-21 11:45:37 +02:00
Kirill Bulatov
eaa4fcbbde
Less reallocations
2021-03-21 11:45:37 +02:00
Kirill Bulatov
ec731e19df
Use smart case in flyimport items lookup
2021-03-21 11:45:37 +02:00
bors[bot]
09412d85fc
Merge #8123
...
8123: Do not display unqualified assoc item completions r=SomeoneToIgnore a=SomeoneToIgnore
Part of https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/autoimport.20weirdness
Removes all flyimport completions for any unqualified associated type, effectively reverting https://github.com/rust-analyzer/rust-analyzer/pull/8095
I've explained the reasoning in the corresponding FIXME and open to discussions.
As an alternative way, we could add yet another parameter in the method that's used by the `qualify_path` and enable it for the qualify assists only.
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2021-03-21 09:37:08 +00:00
Lukas Wirth
38048c35d8
Don't use an untyped String for ActiveParam tracking
2021-03-20 23:22:09 +01:00
Kirill Bulatov
56a7d246d5
Disable unqualified assoc items completion for now
2021-03-20 23:08:44 +02:00
Kirill Bulatov
879432452d
Docs
2021-03-20 22:55:34 +02:00
Kirill Bulatov
a631108d2d
Do not query item search by name eagerly
2021-03-20 22:33:54 +02:00
Kirill Bulatov
81961dc035
Do not propose assoc items without qualifiers
2021-03-20 22:18:43 +02:00
Lukas Wirth
34464ede3f
Fix associated items not being appended to paths in import_assets
2021-03-18 21:36:52 +01:00
Jonas Schievink
5fbb97a0f0
Rename item_tree
query to file_item_tree
2021-03-18 01:53:37 +01:00
Lukas Wirth
5734b347dd
Fix incorrect newline emission in Attrs::docs
2021-03-17 17:00:08 +01:00
Matthias Krüger
ff5f90d8ae
use simpler .map(|x| y) instead of .and_then(|x| Some(y)) for Options. (clippy::bind_instead_of_map)
2021-03-17 02:36:29 +01:00
Matthias Krüger
966c23f529
avoid converting types into themselves via .into() (clippy::useless-conversion)
...
example: let x: String = String::from("hello world").into();
2021-03-17 01:27:56 +01:00
bors[bot]
979e788957
Merge #8034
...
8034: Implement Crate::transitive_reverse_dependencies r=matklad a=Veykril
changelog internal Implement Crate::transitive_reverse_dependencies
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-03-16 14:54:12 +00:00
Aleksey Kladov
f5a81ec468
Upgrade rowan
...
Notably, new rowan comes with support for mutable syntax trees.
2021-03-16 16:10:49 +03:00
Lukas Wirth
e97cd709cd
Implement Crate::transitive_reverse_dependencies
2021-03-15 18:28:31 +01:00
Laurențiu Nicola
88cee24c6c
Enable thread-local coverage marks
2021-03-15 16:02:50 +02:00
Lukas Wirth
41745f48d5
move Semantics::visit_file_defs to ide_db::helpers
2021-03-15 12:18:52 +01:00
bors[bot]
5138baf2ac
Merge #8021 #8022
...
8021: Enable searching for builtin types r=matklad a=Veykril
Not too sure how useful this is for reference search overall, but for completeness sake it should be there
![image](https://user-images.githubusercontent.com/3757771/111132711-f69db600-8579-11eb-8c90-22fd6862d11f.png )
Also enables document highlighting for them.
8022: some clippy::performance fixes r=matklad a=matthiaskrgr
use vec![] instead of Vec::new() + push()
avoid redundant clones
use chars instead of &str for single char patterns in ends_with() and starts_with()
allocate some Vecs with capacity to avoid unnecessary resizing
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Co-authored-by: Matthias Krüger <matthias.krueger@famsik.de>
2021-03-15 10:05:49 +00:00
Aleksey Kladov
5dcdf2ceee
Move code to the appropriate layer
...
StructureNodeKind is a type which is specific to a particular feature,
file_structure. It shouldn't be in the "code shared by all ide features"
part.
2021-03-15 12:55:27 +03:00
Lukas Wirth
9763d9e8c4
Enable searching for builtin types
2021-03-15 09:32:06 +01:00
ivan770
7d48e04f31
Introduce StructureNodeKind
2021-03-14 19:00:41 +02:00
ivan770
71a97a2d8c
Provide regions in file structure
2021-03-14 18:53:37 +02:00
bors[bot]
7accf6bc37
Merge #7799
...
7799: Related tests r=matklad a=vsrs
![tests](https://user-images.githubusercontent.com/62505555/109397453-a9013680-7947-11eb-8b11-ac03079f7645.gif )
This adds an ability to look for tests for the item under the cursor: function, constant, data type, etc
The LSP part is bound to change. But the feature itself already works and I'm looking for a feedback :)
Co-authored-by: vsrs <vit@conrlab.com>
2021-03-13 13:50:35 +00:00
vsrs
daa2637486
Apply review suggestions
2021-03-11 17:39:41 +03:00
Aleksey Kladov
842d8ad9c8
Compilation speed
2021-03-09 22:30:58 +03:00
Kirill Bulatov
778deb38fe
Better strip turbofishes
2021-03-08 23:59:39 +02:00
Kirill Bulatov
5168ab16e1
Add rustdocs and use better names
2021-03-08 23:59:37 +02:00
Kirill Bulatov
dccbb38d2e
Less lifetines: derive SemanticsScope in place
2021-03-08 23:59:20 +02:00
Kirill Bulatov
84c575a212
Restrict fuzzy qualifiers for now
2021-03-08 23:59:20 +02:00
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