Lukas Tobias Wirth
3f796fea9f
simplify
2021-05-05 22:55:12 +02:00
Florian Diebold
cd227f581e
Add and start using TraitRef and ProjectionTy builders
2021-04-04 13:16:38 +02:00
Ayomide Bamidele
276022682b
Gifs and screenshots for features in manual
2021-03-31 00:08:10 +01:00
cynecx
5ff3299dd6
syntax: return owned string instead of leaking string
2021-03-26 18:30:59 +01:00
Lukas Wirth
6c782a5314
Power up goto_implementation
...
by allowing it to be invoked on references of names, showing all (trait)
implementations of the given type in all crates including builtin types
2021-03-15 12:10:18 +01:00
Paco Soberón
e0eb80eaee
Allow comments between newlines in chaining hints
2021-02-17 00:09:56 +01:00
Jonas Schievink
244d8e37f1
Update fixed tests
2021-02-10 14:48:52 +01:00
Lukas Wirth
0aaa61cd56
Only hide parameter hints for path, field and methodcall expressions
2021-01-27 15:03:43 +01:00
Aleksey Kladov
46b4f89c92
.
2021-01-20 01:56:11 +03:00
Lukas Wirth
3d6480bc31
Render Fn* trait objects and impl types as rust does
2021-01-13 13:29:47 +01:00
Jacob Pratt
5e81892d4d
Skip leading underscores unconditionally
2021-01-10 04:23:32 -05:00
Jacob Pratt
22566ecd1b
Short-circuit boolean operation
2021-01-10 03:05:52 -05:00
Jacob Pratt
bd8a903548
Remove unnecessary allocation
...
The case-insensitive prefix/suffix check can be performed
character-by-character. This allows the check to be done without having
to allocate a new string. As a side effect, it's also no longer
necessary to convert the entire string to lowercase, as it's done as
needed. As the only case equality we're handling is ASCII, this
operation can be further optimized by using byte equality, rather than
character equality.
2021-01-09 21:36:38 -05:00
Jacob Pratt
38dd9aa284
Hide argument name hint regardless of case
2021-01-09 04:05:59 -05:00
Aleksey Kladov
f7a15b5cd1
More maintainable config
...
Rather than eagerly converting JSON, we losslessly keep it as is, and
change the shape of user-submitted data at the last moment.
This also allows us to remove a bunch of wrong Defaults
2021-01-06 15:39:28 +03:00
Kirill Bulatov
3f612d37c6
Move the helpers into ide_db
2020-11-28 16:30:39 +02:00
Kirill Bulatov
f4ae3650d8
Extract the import code into the shared module
2020-11-27 18:28:41 +02:00
Lukas Wirth
74c82ca8ce
Only show self
ident when showing parameter self hints
2020-11-02 21:56:16 +01:00
bors[bot]
d021dbeb4f
Merge #6393 #6399
...
6393: Remove repetitive inlay hints (take 2) r=matklad a=lnicola
6399: Keep generic annotations when qualifying things r=matklad a=Veykril
The `qualify_path` assists currently eats up already annotated generics in all but one cases which can be annoying if one already pre-fills generics of a type before it's been qualified.
Co-authored-by: Matthew Sanetra <matthewsanetra@gmail.com>
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2020-11-02 17:40:47 +00:00
Benjamin Coenen
ef2f7bb243
do not use associated types placeholder for inlay hint
...
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-10-28 14:07:12 +01:00
Matthew Sanetra
05723cb50d
Add check if param name is similar to fn name
2020-10-28 14:45:45 +02:00
Lukas Wirth
78c3e4a23c
Hide paramater inlay hints for cloned vars if applicable
2020-10-22 19:44:52 +02:00
Aleksey Kladov
a3a8ad8bc4
Don't rely on display names in inlay_hints
2020-10-20 18:14:14 +02:00
Aleksey Kladov
3b1a648539
More type safety around names
2020-10-20 17:09:03 +02:00
Aleksey Kladov
af4e75533f
Rename declaration_name -> display_name
...
Declaration names sounds like a name of declaration -- something you
can use for analysis. It empathically isn't, and is just a label
displayed in various UI. It's important not to confuse the two, least
we accidentally mix semantics with UI (I believe, there's already a
case of this in the FamousDefs at least).
2020-10-20 15:38:11 +02:00
Lukas Wirth
ed59512d02
Fix iterator hint shortening heuristic
2020-10-12 17:18:21 +02:00
Kirill Bulatov
2bb80a4f03
Also replace the associated types with iter
2020-10-10 21:39:57 +03:00
Kirill Bulatov
9a72b7bccd
Add a test
2020-10-10 20:02:38 +03:00
Lukas Wirth
783af171f7
Clean up inlay_hints
2020-10-07 13:18:12 +02:00
Lukas Wirth
e106857e80
Shorten iterator hints for std::iter iterators behind references
2020-10-07 12:14:08 +02:00
Lukas Wirth
209e9b9926
Shorten iterator chain hints
2020-10-07 11:30:42 +02:00
Lukas Wirth
c133651e0a
Move IntoIterator into FamousDefs
2020-10-07 10:14:42 +02:00
Lukas Wirth
c6f1de6ac5
Use FamousDefs for shorten_iterator hint
2020-10-06 21:25:39 +02:00
Lukas Wirth
aaa3905fdd
Shorten type hints for std::iter Iterators
2020-10-06 19:20:42 +02:00
Lukas Wirth
643bbf15a2
Fix trait object hir formatting behind pointer and references
2020-10-06 14:40:27 +02:00
Igor Aleksanov
3cadba4956
Improve readability in inlay_hints.rs
2020-10-03 13:44:43 +03:00
Igor Aleksanov
91a09f50f4
Remove 'for_expr' test from inlay_hints.rs
2020-10-03 08:58:17 +03:00
Igor Aleksanov
a58441ad1b
Make the tests for complete/incomplete for inlay hints work
2020-10-03 08:37:58 +03:00
Igor Aleksanov
8ca214fbfb
Better inlay hints in 'for' loops
2020-10-03 08:30:25 +03:00
Aleksey Kladov
b06259673f
rename mock_analysis -> fixture
2020-10-02 17:49:44 +02:00
Aleksey Kladov
b0fd3faf36
Switch to expect_test from crates.io
2020-08-21 13:19:31 +02:00
Dave Lage
d31634940d
Fix typo in comment
2020-08-15 16:37:44 -04:00
Aleksey Kladov
1b0c7701cc
Rename ra_ide -> ide
2020-08-13 17:58:27 +02:00