rust/crates
bors[bot] 247faf271b
Merge #9027
9027: feat: Attribute completion is context aware r=Veykril a=Veykril

This splits off the `lint` and `derive` completions into their own submodules of `attribute`.

The idea is to create a lazy global hashmap that maps `SyntaxKind` to attribute names(`&[&str]`) in which we index with the syntax kind of the "thing" we are attributing giving us the attributes back that are valid for this kind. Then we use this name to do a binary search on the attribute list to fetch and build the corresponding completion item.


Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-05-29 12:14:16 +00:00
..
base_db simplify 2021-05-28 20:46:09 +02:00
cfg internal: expose cfg attrs from hir::Crate 2021-05-07 23:50:24 +03:00
flycheck Use package root as cargo check working directory 2021-05-12 19:50:52 -07:00
hir Don't store supertraits in ItemTree 2021-05-27 16:52:30 +03:00
hir_def Test that ItemTree works as intended 2021-05-28 00:46:05 +02:00
hir_expand Merge #9007 2021-05-26 15:36:14 +00:00
hir_ty Move hir_ty incremental test to its own file 2021-05-27 20:21:52 +02:00
ide simplify 2021-05-28 20:46:09 +02:00
ide_assists clippy::redundant_clone fixes 2021-05-26 18:34:50 +03:00
ide_completion Merge #9027 2021-05-29 12:14:16 +00:00
ide_db simplify 2021-05-28 20:46:09 +02:00
ide_ssr syntax: return owned string instead of leaking string 2021-03-26 18:30:59 +01:00
mbe Fixup 2021-05-24 21:47:01 +02:00
parser Add even more docs 2021-05-22 17:20:22 +03:00
paths Clearer naming 2021-04-06 16:22:26 +03:00
proc_macro_api Disable unaliged feature of object 2021-05-24 16:35:52 +03:00
proc_macro_srv Update test fixtures 2021-05-24 18:18:05 +03:00
proc_macro_test Add description for crates that will be published 2020-08-24 13:07:22 +02:00
profile Add more docs 2021-05-22 16:53:47 +03:00
project_model clippy::redundant_clone fixes 2021-05-26 18:34:50 +03:00
rust-analyzer Merge #9028 2021-05-28 15:26:20 +00:00
stdx Don't compare ast::Visibility by stringifying 2021-05-20 17:45:59 +02:00
syntax Attribute completion is context aware 2021-05-27 23:28:14 +02:00
test_utils simplify 2021-05-28 20:46:09 +02:00
text_edit Avoid turning completion objects into builders 2020-11-16 23:16:41 +02:00
toolchain Add description for crates that will be published 2020-08-24 13:07:22 +02:00
tt Add more docs 2021-05-22 16:53:47 +03:00
vfs Avoid duplicating VfsPath in vfs::path_interner::PathInterner by using an IndexSet 2021-04-06 16:03:57 +03:00
vfs-notify Fix slow tests sometimes failing 2021-02-12 16:31:16 +01:00