Jake Heinz
3168148cc6
ide: parallel prime caches
2022-01-14 09:16:35 +00:00
Wang Ruochen
01b3ce3006
Fix documentation of snippet
2022-01-10 21:29:41 -08:00
bors[bot]
40009e07d0
Merge #11145
...
11145: feat: add config to use reasonable default expression instead of todo! when filling missing fields r=Veykril a=bnjjj
Use `Default::default()` in struct fields when we ask to fill it instead of putting `todo!()` for every fields
before:
```rust
pub enum Other {
One,
Two,
}
pub struct Test {
text: String,
num: usize,
other: Other,
}
fn t_test() {
let test = Test {<|>};
}
```
after:
```rust
pub enum Other {
One,
Two,
}
pub struct Test {
text: String,
num: usize,
other: Other,
}
fn t_test() {
let test = Test {
text: String::new(),
num: 0,
other: todo!(),
};
}
```
Co-authored-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
Co-authored-by: Coenen Benjamin <benjamin.coenen@hotmail.com>
2022-01-07 14:10:11 +00:00
Benjamin Coenen
8e0a05eb70
feat(diagnostics): use default expression instead of todo! when missing fields
...
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2022-01-07 15:01:37 +01:00
Benjamin Coenen
b60a29ca94
feat(diagnostics): use default expression instead of todo! when missing fields
...
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2022-01-07 14:13:34 +01:00
Coenen Benjamin
0a4239a815
Update crates/rust-analyzer/src/config.rs
...
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2022-01-07 14:07:02 +01:00
Lukas Wirth
dd20a6f701
feat: poke user when supplying faulty configurations
2022-01-06 14:24:19 +01:00
Lukas Wirth
f6eba28ef8
Adjust config name
2022-01-06 13:50:35 +01:00
Lukas Wirth
dd4b53402d
Regenrate docs and package.json
2022-01-06 13:50:24 +01:00
Lukas Wirth
aecf26d09b
feat: Add config to replace specific proc-macros with dummy expanders
2022-01-06 13:50:18 +01:00
Benjamin Coenen
336c899a07
add better default behavior on fill struct fields diagnostic
...
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2022-01-04 15:59:00 +01:00
David Hotham
b7cabf1e44
fix: don't panic on seeing an unexpected offset
2022-01-03 14:49:47 +00:00
Lukas Wirth
3a525c831f
internal: Handle macro calls better in highlighting
2022-01-02 19:10:10 +01:00
Laurențiu Nicola
53ddf48df4
Avoid collect_vec from itertools
2022-01-02 12:06:14 +02:00
Aleksey Kladov
b9417f3483
feat: correctly fallback to notify if the clinet-side file watching is not supported
2022-01-01 17:26:54 +03:00
Benjamin Coenen
df6fa50f92
feat(diagnostics): add new config to fill default expression
...
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2021-12-31 16:29:08 +01:00
Lukas Wirth
4a5c8c6ad2
fix: Fix windows not finding the pdb file
2021-12-20 19:17:31 +01:00
Lukas Wirth
9fe0f0d1d9
Add a few default snippets for VSCode
2021-12-17 16:24:29 +01:00
Jonas Schievink
deb5c1426d
internal: add "Shuffle Crate Graph" command
2021-12-07 16:37:19 +01:00
Laurențiu Nicola
3678cbd12e
Bump tracing
2021-12-06 20:54:45 +02:00
bors[bot]
8a084e6aca
Merge #10902
...
10902: Handle multiple cargo check quick fix spans r=Veykril a=brandondong
Resolves https://github.com/rust-analyzer/rust-analyzer/issues/10705 .
**Cause:**
- For a cargo check diagnostic with multiple spans, only a single quick fix action would be created at the location of `spans[0]`. Additionally, the hover window details would only show the location of `spans[0]` next to the message.
**Fix:**
- Allow cargo check quick fix actions to be triggerable from multiple selection ranges. Specifically, if the selection intersects with any of the replacement spans, the quick fix action is shown.
- No change in behavior for the hover window details. It's pretty minor and I think showing multiple locations next to the message may be more confusing anyways.
Co-authored-by: Brandon <brandondong604@hotmail.com>
2021-12-05 10:52:54 +00:00
Brandon
fa2818551e
Update expected test results
2021-12-04 21:42:13 -08:00
Brandon
0d1910c6fb
Handle multiple cargo check quick fix spans
2021-12-04 21:41:56 -08:00
Brandon
de05c3d406
Refactor away unnecessary Vec
2021-12-04 19:59:05 -08:00
Lukas Wirth
e4f2d0e3a8
Introduce SymbolKind::Derive
2021-12-04 18:18:09 +01:00
Lukas Wirth
642c1eb720
Introduce SymbolKind::Attribute
2021-12-04 18:01:22 +01:00
Lukas Wirth
d174158abc
Rename things: Tool -> ToolModule
2021-12-03 17:15:19 +01:00
Lukas Wirth
d1677f3286
Remove syntax highlighting hack for builtin attrs
2021-12-03 16:54:34 +01:00
bors[bot]
393cbd0982
Merge #10841
...
10841: Emit moniker in lsif r=Veykril a=HKalbasi
fix #10559
Co-authored-by: hkalbasi <hamidrezakalbasi@protonmail.com>
Co-authored-by: HKalbasi <45197576+HKalbasi@users.noreply.github.com>
2021-11-29 11:13:39 +00:00
hkalbasi
30ed7fac27
Emit moniker in lsif
2021-11-22 21:29:05 +03:30
Emil Gardström
3dc898389f
Make lint groups work correctly with warningsAsInfo
and warningsAsHint
2021-11-22 18:38:28 +01:00
Laurențiu Nicola
a68ce62f6a
Add toggle to disable cache priming
2021-11-19 19:30:11 +02:00
Florian-Schoenherr
7e25f1b7e2
fix: show custom check-command
2021-11-19 16:22:39 +01:00
Paul Horn
553bb7f50a
Allow clients to configure the global workspace search limit
2021-11-18 17:52:02 +01:00
Jake Heinz
520ff62f4e
flip the default
2021-11-13 23:39:34 +00:00
Jake Heinz
d3d768de0d
inlay hints: add the option to always show constructor inlay hints
2021-11-13 23:12:29 +00:00
Florian-Schoenherr
4fb76743ca
fix: show the right check-command
...
Signed-off-by: Florian-Schoenherr <florian.schoenherr99@gmail.com>
2021-11-09 21:52:55 +01:00
Laurențiu Nicola
d18a379c7b
Bump deps
2021-11-06 17:40:38 +02:00
bors[bot]
53b5b2fdaa
Merge #10596
...
10596: internal: Set server status to warning when proc-macro sources change r=Veykril a=Veykril
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/10027
![image](https://user-images.githubusercontent.com/3757771/138102552-208d3edf-a843-49e6-9f48-1e911f54a4ba.png )
It feels wrong using the database in this part of the code, but this was the only way to figure out whether a file belongs to a proc-macro that I could think of.
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-11-03 14:02:10 +00:00
Lukas Wirth
1d80302b76
Set server status to warning when proc-macro sources change
2021-10-30 14:49:32 +02:00
vsrs
2f862cd6fe
Fix Plaintext textDocument/hover
2021-10-29 18:23:47 +03:00
bors[bot]
057558b756
Merge #10595
...
10595: internal: Fix a format error r=Veykril a=dzvon
Fixes #10581
Co-authored-by: Dezhi Wu <wu543065657@163.com>
2021-10-29 10:40:43 +00:00
Dezhi Wu
74396d27c0
Fix: correct markdown link form.
2021-10-29 18:25:32 +08:00
Dezhi Wu
097d527cbd
Fix: use a concise way to change link form when generating package.json
2021-10-29 10:00:10 +08:00
Lukas Wirth
3018ffd85e
Refactor ide handling for paths in derive inputs
2021-10-28 16:47:19 +02:00
Dezhi Wu
ffc6cdd871
Fix: transform the asciidoc form link to markdown style when generating the package.json
2021-10-28 10:13:43 +08:00
bors[bot]
9d1f15086a
Merge #10649
...
10649: internal: Remove `CompletionKind` in favor of `CompletionItemKind` r=Veykril a=Veykril
and move some more tests around
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-10-27 15:38:42 +00:00
Lukas Wirth
0468b11de7
Remove CompletionKind
in favor of CompletionItemKind
2021-10-27 17:23:43 +02:00
bors[bot]
ba2b599131
Merge #10592
...
10592: Fix: only shows one # when we encounter ## r=Veykril a=dzvon
Fixes #10584
Co-authored-by: Dezhi Wu <wu543065657@163.com>
2021-10-26 13:17:13 +00:00
Dezhi Wu
31af94b73a
perf: avoid allocating by just slicing.
...
Signed-off-by: Dezhi Wu <wu543065657@163.com>
2021-10-26 20:59:48 +08:00