Ayomide Bamidele
391be07298
Folding range for consts
2021-03-29 12:17:19 +01:00
Ayomide Bamidele
23601454fe
New FoldKinds - Consts, Statics
2021-03-29 11:49:14 +01:00
Ayomide Bamidele
f6702dda9a
Test cases for folding consts and statics
2021-03-29 11:43:03 +01:00
bors[bot]
ae7de296ae
Merge #8222
...
8222: Don't mark unlinked file diagnostic as unused r=lnicola a=jonas-schievink
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/8215 , at least on VS Code
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-03-29 07:30:28 +00:00
bors[bot]
bb1d925dab
Merge #8212
...
8212: Basic support macro 2.0 r=jonas-schievink a=edwin0cheng
Turn out it is quite straight forward :)
r @jonas-schievink
![m2](https://user-images.githubusercontent.com/11014119/112712565-6eb99380-8f0b-11eb-88de-5d7f974dfe6d.png )
Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2021-03-28 15:43:11 +00:00
Jonas Schievink
bd18e5fa87
Don't mark unlinked file diagnostic as unused
2021-03-28 03:56:03 +02:00
Lukas Wirth
c9e479870b
Prefer add mod
declaration to lib.rs over file.rs in UnlinkedFile fix
2021-03-27 23:43:07 +01:00
Edwin Cheng
eedadd7024
Add support for doc on hover for macro 2.0
2021-03-27 14:57:11 +08:00
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
ivan770
50e28aec25
Ignore main functions not in root module
2021-03-26 16:04:53 +02:00
Jonas Schievink
37c6ce34a9
Document unlinked-file diagnostic
2021-03-24 22:18:17 +01:00
Brandon
903a2e98f9
Clean up implementation
2021-03-24 00:47:55 -07:00
Brandon
0d063b8d21
Fix MISSING: command error with macros
2021-03-24 00:00:38 -07:00
bors[bot]
c6d6a7d412
Merge #8178
...
8178: Show item info when hovering intra doc links r=Veykril a=Veykril
![r4uIITP0IZ](https://user-images.githubusercontent.com/3757771/112197618-91e2fb00-8c0c-11eb-9edc-a7923214d2b6.gif )
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-03-23 19:58:03 +00:00
Lukas Wirth
caaeb92882
Cleanup intra_doc_link parsing
2021-03-23 20:56:38 +01:00
Lukas Wirth
8b0d0bd9c7
Show item info when hovering intra doc links
2021-03-23 19:57:04 +01:00
Lukas Wirth
6bdf505d7c
simplify
2021-03-23 17:49:06 +01:00
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