aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/inlay_hints.rs
Commit message (Collapse)AuthorAgeFilesLines
* minor: use minicoreAleksey Kladov2021-06-181-13/+4
|
* minor: use minicoreAleksey Kladov2021-06-181-3/+1
|
* internal: minimize minicoreAleksey Kladov2021-06-171-3/+3
| | | | | | We want to keep minicore small, so let's split out iterator adapters and sources into a separate `iterators` region, and use them only when needed.
* internal: switch some tests to minicoreAleksey Kladov2021-06-171-16/+15
|
* clippy::redudant_borrowMaan20032021-06-131-3/+3
|
* Cleanup parameter_hint_heuristics inlay hints testLukas Wirth2021-06-041-87/+68
|
* Reorganize inlay_hints testsLukas Wirth2021-06-041-522/+493
|
* Prefix/suffix parameter inlay hint hiding heuristic is more strictLukas Wirth2021-06-031-70/+57
|
* Merge #8942bors[bot]2021-05-251-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | 8942: Add `library` semantic token modifier to items from other crates r=arzg a=arzg Closes #5772. A lot of code here is pretty repetitive; please let me know if you have any ideas how to improve it, or whether it’s fine as-is. Side-note: How can I add tests for this? I don’t see a way for the test Rust code in `test_highlighting` to reference other crates to observe the new behaviour. Co-authored-by: Aramis Razzaghipour <[email protected]>
| * Remove hir krate methodsAramis Razzaghipour2021-05-241-1/+1
| |
* | Minor: fix comment styleAleksey Kladov2021-05-231-1/+3
|/ | | | See https://github.com/rust-analyzer/rust-analyzer/blob/master/docs/dev/style.md#documentation
* Add basic support for array lengths in typesJade2021-05-111-1/+1
| | | | | | | | | | This recognizes `let a = [1u8, 2, 3]` as having type `[u8; 3]` instead of the previous `[u8; _]`. Byte strings and `[0u8; 2]` kinds of range array declarations are unsupported as before. I don't know why a bunch of our rustc tests had single quotes inside strings un-escaped by `UPDATE_EXPECT=1 cargo t`, but I don't think it's bad? Maybe something in a nightly?
* simplifyLukas Tobias Wirth2021-05-051-3/+1
|
* Add and start using TraitRef and ProjectionTy buildersFlorian Diebold2021-04-041-1/+1
|
* Gifs and screenshots for features in manualAyomide Bamidele2021-03-311-0/+2
|
* syntax: return owned string instead of leaking stringcynecx2021-03-261-1/+1
|
* Power up goto_implementationLukas Wirth2021-03-151-1/+1
| | | | | by allowing it to be invoked on references of names, showing all (trait) implementations of the given type in all crates including builtin types
* Allow comments between newlines in chaining hintsPaco Soberón2021-02-161-16/+22
|
* Update fixed testsJonas Schievink2021-02-101-0/+1
|
* Only hide parameter hints for path, field and methodcall expressionsLukas Wirth2021-01-271-1/+19
|
* .Aleksey Kladov2021-01-191-1/+1
|
* Render Fn* trait objects and impl types as rust doesLukas Wirth2021-01-131-0/+37
|
* Skip leading underscores unconditionallyJacob Pratt2021-01-101-2/+5
|
* Short-circuit boolean operationJacob Pratt2021-01-101-4/+8
|
* Remove unnecessary allocationJacob Pratt2021-01-101-7/+12
| | | | | | | | | | 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.
* Hide argument name hint regardless of caseJacob Pratt2021-01-091-3/+10
|
* More maintainable configAleksey Kladov2021-01-061-10/+11
| | | | | | | 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
* Move the helpers into ide_dbKirill Bulatov2020-11-281-2/+2
|
* Extract the import code into the shared moduleKirill Bulatov2020-11-271-2/+2
|
* Only show `self` ident when showing parameter self hintsLukas Wirth2020-11-021-2/+23
|
*-. Merge #6393 #6399bors[bot]2020-11-021-2/+106
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]> Co-authored-by: Lukas Wirth <[email protected]>
| * | Add check if param name is similar to fn nameMatthew Sanetra2020-10-281-2/+106
| |/
* / do not use associated types placeholder for inlay hintBenjamin Coenen2020-10-281-0/+21
|/ | | | Signed-off-by: Benjamin Coenen <[email protected]>
* Hide paramater inlay hints for cloned vars if applicableLukas Wirth2020-10-221-1/+28
|
* Don't rely on display names in inlay_hintsAleksey Kladov2020-10-201-6/+13
|
* More type safety around namesAleksey Kladov2020-10-201-3/+2
|
* Rename declaration_name -> display_nameAleksey Kladov2020-10-201-1/+1
| | | | | | | | 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).
* Fix iterator hint shortening heuristicLukas Wirth2020-10-121-2/+2
|
* Also replace the associated types with iterKirill Bulatov2020-10-101-11/+14
|
* Add a testKirill Bulatov2020-10-101-23/+39
|
* Clean up inlay_hintsLukas Wirth2020-10-071-18/+14
|
* Shorten iterator hints for std::iter iterators behind referencesLukas Wirth2020-10-071-2/+4
|
* Shorten iterator chain hintsLukas Wirth2020-10-071-36/+81
|
* Move IntoIterator into FamousDefsLukas Wirth2020-10-071-23/+5
|
* Use FamousDefs for shorten_iterator hintLukas Wirth2020-10-061-57/+36
|
* Shorten type hints for std::iter IteratorsLukas Wirth2020-10-061-6/+125
|
* Fix trait object hir formatting behind pointer and referencesLukas Wirth2020-10-061-0/+34
|
* Improve readability in inlay_hints.rsIgor Aleksanov2020-10-031-4/+5
|
* Remove 'for_expr' test from inlay_hints.rsIgor Aleksanov2020-10-031-14/+1
|
* Make the tests for complete/incomplete for inlay hints workIgor Aleksanov2020-10-031-10/+77
|