Commit Graph

71 Commits

Author SHA1 Message Date
Lukas Wirth
707be6b99c Adjust display impls to respect lifetime bounds 2024-04-02 14:51:08 +02:00
Young-Flash
ba8c9810aa review update 2024-03-25 19:55:19 +08:00
Young-Flash
1c85234bcd limit struct field hover display nums 2024-03-25 19:55:19 +08:00
Lukas Wirth
d69a81fddb fix: Fix wrong where clause rendering on hover 2024-03-16 17:49:59 +01:00
Lukas Wirth
b20e467373 internal: Adjust a few things for trait assoc item hovers 2024-03-05 11:06:36 +01:00
Young-Flash
dba67b46a1 update for review 2024-03-02 10:01:04 +08:00
Young-Flash
2e87f31fe9 add HoverDisplayConfig 2024-02-22 17:37:40 +08:00
Young-Flash
35ec5955eb add config item for hover display 2024-02-21 11:08:45 +08:00
Young-Flash
00358b1fe0 rebase on lastest master 2024-02-21 10:57:39 +08:00
Young-Flash
dba167592e feat: add hover display for trait assoc items 2024-02-21 10:57:39 +08:00
Lukas Wirth
81ea48a573 fix: Fix tuple structs not rendering visibility in their fields 2024-02-08 10:05:28 +01:00
Lukas Wirth
963568b46f feat: IDE features for primitive tuple fields 2024-01-06 15:04:58 +01:00
Lukas Wirth
e844784d8d Simplify 2023-11-14 12:53:14 +01:00
YangzeLuo
41bcd542e2 feat: preview adt field when hover 2023-11-08 21:45:32 +08:00
ponyii
fec5ff9890 start hovering default values of generic constants 2023-08-15 20:26:42 +04:00
oxalica
6a2f83a8a2
Impl HirDisplay for SelfParam 2023-08-09 02:26:44 +08:00
Lukas Wirth
bcff166b3a Add ExternCrateDecl to HIR 2023-08-02 11:52:55 +02:00
hkalbasi
3a1054fc1c Replace x with it 2023-07-06 17:33:17 +03:30
Lukas Wirth
dc7c6d43c7 Slightly shrink DefMap 2023-06-01 14:46:36 +02:00
Lukas Wirth
c7ef6c25b7 internal: Replace Display impl for Name 2023-05-24 20:55:12 +02:00
Lukas Wirth
a1b96b1e00 Remove unnecessary Names from FunctionData::params 2023-04-06 20:14:51 +02:00
Lukas Wirth
8e7c104b3a Move hir_def::adt to hir_def::data::adt 2023-04-06 19:23:29 +02:00
Ryo Yoshida
29c957f973
Lower and handle trait aliases in HIR 2023-03-04 00:24:07 +09:00
Ryo Yoshida
d4166234ef
Adjust block-local impl item visibility rendering 2023-02-20 00:44:51 +09:00
Ryo Yoshida
443801755c
Refactor
- Remove unnecessary references and derefs
- Manual formatting
2023-02-19 23:55:49 +09:00
Lukas Wirth
1535881836 Replace SmolStr usage with lang item enum for lang items 2023-01-21 17:55:45 +01:00
Lukas Wirth
27ba598dfe Make inlay hint location links work for more types 2023-01-14 13:30:56 +01:00
Yuri Astrakhan
e16c76e3c3 Inline all format arguments where possible
This makes code more readale and concise,
moving all format arguments like `format!("{}", foo)`
into the more compact `format!("{foo}")` form.

The change was automatically created with, so there are far less change
of an accidental typo.

```
cargo clippy --fix -- -A clippy::all -W clippy::uninlined_format_args
```
2022-12-24 14:36:10 -05:00
Lukas Wirth
77cfc9b392 Fix type alias hovers not rendering generic parameters 2022-10-01 00:21:29 +02:00
Amos Wenger
7e285e1ef5 Run cargo fmt 2022-07-20 15:06:15 +02:00
Amos Wenger
816f7fe12a Run cargo fix --edition-idioms 2022-07-20 15:02:08 +02:00
Lukas Wirth
7ff6c36716 fix: Don't show qualified path completions for private items 2022-07-15 13:30:43 +02:00
Lukas Wirth
4f97950595 fix: Fix uncorrect use of double braces in HirDisplay implementations 2022-05-02 12:39:38 +02:00
Jonas Schievink
5d8b4c40eb Determine function unsafety semantically 2022-04-07 18:33:03 +02:00
Laurențiu Nicola
bd570903b0 Add and use HirFormatter::write_{str,char} 2022-04-07 16:41:07 +03:00
hkalbasi
b301b040f5 Add const generics 2022-03-14 14:38:37 +03:30
Lukas Wirth
6c8c02f625 Don't parse source files to generate macro completion details 2022-03-10 22:21:58 +01:00
hkalbasi
1282178783 insert dummy values for const generics in subst 2022-03-09 02:02:42 +03:30
Andy Russell
49fab593ad
show variadic args in hover function signature 2022-03-04 16:44:31 -05:00
hkalbasi
4fa8749c44 Preserve order of generic args 2022-03-04 11:46:14 +03:30
Lukas Wirth
661d721e20 Add completion module tailored towards use trees 2022-02-03 15:51:57 +01:00
Florian Diebold
4ed5fe1554 Fix assoc type shorthand from method bounds
In code like this:
```rust
impl<T> Option<T> {
    fn as_deref(&self) -> T::Target where T: Deref {}
}
```

when trying to resolve the associated type `T::Target`, we were only
looking at the bounds on the impl (where the type parameter is defined),
but the method can add additional bounds that can also be used to refer
to associated types. Hence, when resolving such an associated type, it's
not enough to just know the type parameter T, we also need to know
exactly where we are currently.

This fixes #11364 (beta apparently switched some bounds around).
2022-02-03 13:15:02 +01:00
Lukas Wirth
cd9d76e0ca internal: Store function param names in ItemTree 2021-12-20 15:24:37 +01:00
Laurențiu Nicola
32b6f103a6 Bump chalk 2021-12-19 18:58:39 +02:00
Lukas Wirth
1bbc255ec5 Remove some allocations 2021-12-10 20:01:24 +01:00
Jake Heinz
7cbc6ae920 ide: hover omits unnamed where preds 2021-11-20 11:45:12 +00:00
Lukas Wirth
7776aad166 internal: Flatten Definition::ModuleDef variant 2021-11-11 00:05:53 +01:00
Jonas Schievink
3aa37d7f80 Avoid cycle when lowering predicates for associated item lookup 2021-10-04 17:39:55 +02:00
Lukas Wirth
b6ed91a6de Rename *Owner traits to Has* 2021-09-27 12:54:24 +02:00
Dawer
dfb15292c2 fix: Type param hover shows correct sized bounds. 2021-09-10 20:48:39 +05:00