diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-02-10 19:00:36 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-02-10 19:00:36 +0000 |
commit | b952c270ee87cc36500b3bb03bab9268f2184d1a (patch) | |
tree | 4ce4304b73a9e10fea6bfb6d04404c1efdbbbf84 /crates/ra_hir/src/code_model_impl | |
parent | 8e4be2708635818aa3e210f0e39fb871cc433004 (diff) | |
parent | 1a4faaffd7608553528e19d1ad973cedf017e3ce (diff) |
Merge #762
762: "Dumb" auto import assist r=matklad a=eulerdisk
This adds a new assist to "add xxx::yyy to the current file" when the cursor is on a PATH. It manages correctly nested imports,`self` keyword and creates new nested imports if necessary. [See the tests]
It doesn't use name resolution so in that sense is 'dumb', but I have plans to do that. That in the future will be useful to auto import trait names in autocompletion for example.
It can easily be extended to provide multiple actions to select in which scope to import. That's another thing I plan to do.
@matklad I copied some indentation code from `ide_light`, I don't know at the moment if/how you want to refactor that code. This assist was meant to be in `ide_light`.
Co-authored-by: Andrea Pretto <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/code_model_impl')
0 files changed, 0 insertions, 0 deletions