mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-16 09:48:10 +00:00
80ab753d7e
7572: Add `find_or_create_impl_block` to assist utils r=matklad a=yoshuawuyts This is another continuation of https://github.com/rust-analyzer/rust-analyzer/pull/7562, introducing a small util to either find an `impl` block, or create a new one if none exists. I copied this code from the `generate_new` assist into https://github.com/rust-analyzer/rust-analyzer/pull/7562, and this unifies both into a helper. It doesn't feel super polished in its current state, but my hope is that this is enough of a starting point that it can be expanded on later. For example something that would be useful would be a flag which either returns the index of the start of the block, or the end of the block. Anyway, I hope this is useful. Thanks! Co-authored-by: Yoshua Wuyts <yoshuawuyts@gmail.com> |
||
---|---|---|
.. | ||
assists | ||
base_db | ||
cfg | ||
completion | ||
flycheck | ||
hir | ||
hir_def | ||
hir_expand | ||
hir_ty | ||
ide | ||
ide_db | ||
mbe | ||
parser | ||
paths | ||
proc_macro_api | ||
proc_macro_srv | ||
proc_macro_test | ||
profile | ||
project_model | ||
rust-analyzer | ||
ssr | ||
stdx | ||
syntax | ||
test_utils | ||
text_edit | ||
toolchain | ||
tt | ||
vfs | ||
vfs-notify |