Lukas Wirth
638dcac092
Make more use of the HIR in rename::rename_to_self
2021-03-23 16:54:21 +01:00
Lukas Wirth
bad4e48672
Set up a search scope when searching for mbe macro references
2021-03-23 11:32:10 +01:00
bors[bot]
d4fa6721af
Merge #8054
...
8054: Item movers r=matklad a=ivan770
Closes #6823
https://user-images.githubusercontent.com/14003886/111331579-b4f43480-8679-11eb-9af0-e4dabacc4923.mp4
Implementation issues:
- [ ] Most of items are non-movable, since _movability_ of any item has to be determined manually. Common ones are movable though
- [x] Cursor should move with the item
Co-authored-by: ivan770 <leshenko.ivan770@gmail.com>
2021-03-22 13:08:45 +00:00
Matthias Krüger
ae7e55c1dd
clippy::complexity simplifications related to Iterators
2021-03-21 13:13:34 +01:00
Lukas Wirth
38048c35d8
Don't use an untyped String for ActiveParam tracking
2021-03-20 23:22:09 +01:00
Jonas Schievink
636de3c709
Add AttrsWithOwner
and clean up source_map
2021-03-19 21:23:57 +01:00
Jonas Schievink
fc5f73de45
Move AttrsOwnerNode
to syntax and make it public
2021-03-19 20:05:17 +01:00
ivan770
d331155f8d
Remove needless lifetime
2021-03-19 17:01:39 +02:00
ivan770
2794cc7b00
Added more movable lists
2021-03-19 16:43:47 +02:00
bors[bot]
7200b994c9
Merge #8097
...
8097: Parse extended_key_value_attributes r=jonas-schievink a=Veykril
Companion PR https://github.com/rust-analyzer/ungrammar/pull/31
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-03-19 11:38:40 +00:00
ivan770
0a2d221d47
Added arglist mover
2021-03-19 10:28:09 +02:00
Lukas Wirth
4771a56791
Parse extended_key_value_attributes
2021-03-19 02:13:46 +01:00
Lukas Wirth
8c0f454d11
Use a highlight modifier for intra doc links
2021-03-18 22:32:07 +01:00
bors[bot]
b70bea0d79
Merge #8083
...
8083: Track source file IDs in source mapping of Attrs r=jonas-schievink a=Veykril
Fixes the panics/incorrect injection highlighting of outline module declarations until we figure out a nicer source mapping strategy for attributes.
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-03-18 19:26:10 +00:00
Jonas Schievink
4390125314
Add test for goto def on proc macro invocation
2021-03-18 17:24:17 +01:00
Jonas Schievink
c05a1a6e37
Store an AstId
for procedural macros
2021-03-18 16:11:18 +01:00
Lukas Wirth
d41a1690d2
Track source file IDs in source mapping of Attrs
2021-03-18 13:16:27 +01:00
ivan770
f62944f416
Remove prioritization, add more movable items
2021-03-18 11:22:28 +02:00
ivan770
b67a91b960
Fix code after rowan version bump
2021-03-18 11:22:28 +02:00
ivan770
a154ef7ca1
Remove movable array, improve client code
2021-03-18 11:22:27 +02:00
ivan770
7d60458495
Item up and down movers
2021-03-18 11:22:27 +02:00
Lukas Wirth
9763f0a6bd
Semantic highlight intradoclinks in documentation
2021-03-17 21:00:01 +01:00
bors[bot]
ec10835d60
Merge #8069
...
8069: Inject highlight into block doc comments r=Veykril a=Veykril
bors r+
Closes https://github.com/rust-analyzer/rust-analyzer/issues/6873
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-03-17 18:20:25 +00:00
Lukas Wirth
37964f9fef
Inject highlight into block doc comments
2021-03-17 19:12:28 +01:00
Lukas Wirth
5481c78f32
Check whether cursor is on and not between intra doc links in goto_definition
2021-03-17 17:24:16 +01:00
Lukas Wirth
5734b347dd
Fix incorrect newline emission in Attrs::docs
2021-03-17 17:00:08 +01:00
Lukas Wirth
ec824a92d0
Better handling of block doc comments
2021-03-17 14:48:57 +01:00
bors[bot]
0fbfab3b45
Merge #8059
...
8059: Move doc-comment highlight injection from AST to HIR r=matklad,jonas-schievink a=Veykril
Fixes #5016
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-03-17 11:13:54 +00:00
Lukas Wirth
cdfb5c353f
Remove quadratic attr source lookup
2021-03-17 11:22:40 +01:00
Matthias Krüger
048dad8c2e
don't clone types that are copy (clippy::clone_on_copy)
2021-03-17 01:56:31 +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
Lukas Wirth
c766492d26
Properly handle doc attributes in doc-comment highlight injection
2021-03-16 21:15:26 +01:00
Lukas Wirth
acc6458390
Replace trait object boxing with extra AttrsOwnerNode
2021-03-16 19:06:58 +01:00
Lukas Wirth
11e9bc60a2
Move doc-comment highlight injection from AST to HIR
2021-03-16 18:57:47 +01:00
bors[bot]
00c80b208b
Merge #8055
...
8055: Implement HirDisplay for some more types r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-03-16 15:48:35 +00:00
bors[bot]
a69f7ce312
Merge #8053
...
8053: Remove ShortLabel r=Veykril a=Veykril
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-03-16 15:40:06 +00:00
Lukas Wirth
4d1e1daa31
Implement HirDisplay for some more types
2021-03-16 16:36:34 +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
Lukas Wirth
4628d94e74
Remove ShortLabel
2021-03-16 15:44:31 +01:00
Lukas Wirth
75fafd6fcc
Add new_source_root meta to test fixtures
2021-03-16 15:28:02 +01:00
bors[bot]
c49b5b7468
Merge #7498
...
7498: Clone for update r=matklad a=matklad
rowan counterpart https://github.com/rust-analyzer/rowan/pull/93
#6857
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-03-16 13:14:48 +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
bors[bot]
1a82af3527
Merge #7900 #8000
...
7900: show function params in completion detail r=matklad a=JoshMcguigan
This resolves #7842 by updating the detail for function completions from `-> T` to `fn(T, U) -> V`. I added an expicit unit test for this, `ide_completion::render::fn_detail_includes_args_and_return_type`, which passes.
Lots of other unit tests fail (~60 of them) due to this change, although I believe the failures are purely cosmetic (they were testing the exact format of this output). I'm happy to go update those tests, but before I do that I'd like to make sure this is in fact the format we want for the detail?
edit - I realized `UPDATE_EXPECT=1 cargo test` automatically updates `expect!` tests. Big 👍 to whoever worked on that! So I'll go ahead and update all these tests soon. But I still would like to confirm `fn(T, U) -> V` is the desired content in the `detail` field.
8000: Use hir formatter for hover text r=matklad a=oxalica
Fix #2765 , (should) fix #4665
Co-authored-by: Josh Mcguigan <joshmcg88@gmail.com>
Co-authored-by: oxalica <oxalicc@pm.me>
2021-03-16 08:05:24 +00:00
bors[bot]
d38fd77845
Merge #8028
...
8028: Return multiple modules in `parent_module` feature r=matklad a=Veykril
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-03-15 17:50:20 +00:00
Lukas Wirth
e97cd709cd
Implement Crate::transitive_reverse_dependencies
2021-03-15 18:28:31 +01:00
oxalica
455b418263
Update tests
2021-03-16 01:24:26 +08:00
oxalica
7c855c940a
Clean usage of ShortLabel
2021-03-16 01:05:56 +08:00
oxalica
87171238c6
Use hir formatter more
2021-03-16 01:04:33 +08:00
oxalica
ef416e0154
Impl HirDisplay for function hover message
2021-03-16 01:04:20 +08:00
oxalica
ef48d1ca3b
Add test for hover of macro expanded function
2021-03-16 01:01:24 +08:00