Lukas Wirth
0d3cd90d08
Move fn to proc-macro conversion to name classification
2022-02-21 17:56:11 +01:00
Lukas Wirth
cef8a17ea5
Handle proc-macro functions as the proc-macro they resolve to
2022-02-11 22:06:03 +01:00
Moritz Vetter
ba2ef69c79
Bump pulldown-cmark-to-cmark, adjust usages and fix test
2022-02-06 09:04:06 +01:00
Lukas Wirth
f6def3ccdf
fix: Fix proc-macro server not using the supplied span in Ident::new
2022-01-31 17:02:57 +01:00
Lukas Wirth
45ff51ba22
Make more precise range macro upmapping
2022-01-31 15:53:44 +01:00
Lukas Wirth
5fd3688018
Fix token ascension single token check being inverted
2022-01-31 13:26:09 +01:00
Lukas Wirth
ddf7b70a0f
Fix cfg_attr invalidating derive identifier IDE functionality
2022-01-30 22:47:16 +01:00
bors[bot]
2cb85c14b6
Merge #11281
...
11281: ide: parallel prime caches r=jonas-schievink a=jhgg
cache priming goes brrrr... the successor to #10149
---
this PR implements a parallel cache priming strategy that uses a topological work queue to feed a pool of worker threads the crates to index in parallel.
## todo
- [x] should we keep the old prime caches?
- [x] we should use num_cpus to detect how many cpus to use to prime caches. should we also expose a config for # of worker CPU threads to use?
- [x] something is wonky with cancellation, need to figure it out before this can merge.
Co-authored-by: Jake Heinz <jh@discordapp.com>
2022-01-25 16:03:35 +00:00
Laurențiu Nicola
e3e6133ff4
Bump pulldown-cmark and pulldown-cmark-to-cmark
2022-01-21 19:49:57 +02:00
Jonas Schievink
a3d06f824b
status: output all crates a file belongs to
2022-01-17 18:10:01 +01:00
bors[bot]
7a52f83700
Merge #11294
...
11294: internal: Move format specifier lexing from syntax to ide_db r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2022-01-15 12:18:46 +00:00
Lukas Wirth
91279db2b4
Move format specifier lexing from syntax to ide_db
2022-01-15 13:14:59 +01:00
bors[bot]
4c34909308
Merge #11293
...
11293: feat: Add very simplistic ident completion for format_args! macro input r=Veykril a=Veykril
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2022-01-15 11:24:21 +00:00
Lukas Wirth
82fccb971e
feat: Add very simplistic ident completion for format_args! macro input
2022-01-15 12:23:26 +01:00
Jake Heinz
25f67b6939
make it a config
2022-01-15 02:47:47 +00:00
bors[bot]
9ba6cfa9c7
Merge #11283
...
11283: fix: Adjust `.` typing auto indentation r=Veykril a=Veykril
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/629
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2022-01-14 11:16:18 +00:00
Lukas Wirth
ba3efafc0d
fix: Adjust .
typing auto indentation
2022-01-14 12:15:43 +01:00
Jake Heinz
bcc99091f3
hacky fix for cancelling
2022-01-14 10:30:51 +00:00
Jake Heinz
6c5504a617
one last bit of cleanup
2022-01-14 10:10:47 +00:00
Jake Heinz
c3f30ae4f0
removed scoped threads, cleanup
2022-01-14 10:06:28 +00:00
Jake Heinz
f83c0166be
cleanup + detect num cpus
2022-01-14 09:48:59 +00:00
Jake Heinz
0b0bfc6fdd
cleanup
2022-01-14 09:36:03 +00:00
Jake Heinz
c8aa2f6a61
use index map
2022-01-14 09:35:41 +00:00
Jake Heinz
5f0c1aa2de
make progress callback dyn
2022-01-14 09:33:40 +00:00
Jake Heinz
2b0d8a86a2
fix warnings
2022-01-14 09:25:45 +00:00
Jake Heinz
343b0ccfb9
simplify
2022-01-14 09:21:25 +00:00
Jake Heinz
3168148cc6
ide: parallel prime caches
2022-01-14 09:16:35 +00:00
Jonas Schievink
09219e10f1
Mostly restore hir
API boundary
2022-01-12 19:56:47 +01:00
Lukas Wirth
b32f611b6e
fix: Fix outline modules spilling inner doc injections into their parent
2022-01-08 14:54:31 +01:00
Lukas Wirth
6746ba5839
Record attribute calls on assoc items in TraitData and ImplData
2022-01-08 10:45:12 +01: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
Lukas Wirth
ca4baa6e55
Use FileAstId<ast::Adt>
in nameres where appropriate instead
2022-01-07 14:20:27 +01:00
Laurențiu Nicola
e14d9208f5
Move pretty-printing test out of assist
2022-01-06 16:38:25 +02:00
Lukas Wirth
dc135cc076
internal: Support registered tools and attributes in ide layer
2022-01-06 14:56:50 +01:00
Jonas Platte
c90c88b083
Always put a space after impl in macro pretty-printing
...
… regardless of whether the next symbol is punctuation or not.
2022-01-06 11:33:08 +01:00
bors[bot]
ac3ea3e81c
Merge #11112
...
11112: Evaluate constants in array repeat expression r=HKalbasi a=HKalbasi
cc #8655
Co-authored-by: hkalbasi <hamidrezakalbasi@protonmail.com>
2022-01-04 21:51:37 +00:00
hkalbasi
75c2acae6e
Evaluate constants in array repeat expression
2022-01-05 01:17:01 +03:30
Lukas Wirth
c5a9985fc5
Remove lossy Definition::from_token
/Definition::from_node
methods
2022-01-04 18:29:53 +01:00
bors[bot]
68bc12c3b8
Merge #11157
...
11157: internal: Remove `SemanticScope::speculative_resolve_as_mac` r=Veykril a=Veykril
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/11132
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2022-01-04 16:49:47 +00:00
Lukas Wirth
19f1ff5c70
give resolve_derive_ident
a more robust api
2022-01-03 16:00:45 +01:00
bors[bot]
8e9ccbf97a
Merge #11177
...
11177: internal: dont descend into comments r=Veykril a=jhgg
fixes #11176
Co-authored-by: Jake Heinz <jh@discordapp.com>
2022-01-03 02:03:03 +00:00
Jake Heinz
04decd5e6b
internal: dont descend into comments
2022-01-03 01:53:58 +00:00
bors[bot]
abbc7e3a0e
Merge #11088
...
11088: closes #10446 hide type inlay hints r=Veykril a=Heinenen
Passes tests as described in #10446
Works for all happy cases, there may be some cases that I forgot as I am not that familiar with Rust and r-a (yet).
Co-authored-by: Heinenen <th.m.heinen@gmail.com>
2022-01-03 00:51:08 +00:00
Lukas Wirth
087122ad1a
fix: Fix highlighting hack for self-params
2022-01-03 01:32:03 +01:00
Lukas Wirth
6b7b09d329
internal: Record unresolved derive invocations in hir
2022-01-02 23:44:23 +01:00
Lukas Wirth
762a3b3030
Fix tool module classification not working correctly
2022-01-02 23:14:18 +01:00
Lukas Wirth
19d894cdec
minor: Cleanup syntax highlighting
2022-01-02 22:23:05 +01:00
Lukas Wirth
22160c418b
fix NameRefClass misclassifying proc-macros
2022-01-02 19:20:10 +01:00
Lukas Wirth
9eed85b171
fix syntactic highlighting for macros
2022-01-02 19:10:23 +01:00
Lukas Wirth
3a525c831f
internal: Handle macro calls better in highlighting
2022-01-02 19:10:10 +01:00