rust/crates
bors[bot] b952c270ee 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 <eulerdisk@gmail.com>
2019-02-10 19:00:36 +00:00
..
gen_lsp_server reformat the world 2019-02-08 14:49:43 +03:00
ra_arena reformat the world 2019-02-08 14:49:43 +03:00
ra_assists Merge #762 2019-02-10 19:00:36 +00:00
ra_batch Clean up a bit 2019-02-10 11:48:59 +01:00
ra_cli Add an ra_cli command that analyses all crates in the current workspace 2019-02-10 10:56:58 +01:00
ra_db Add an ra_cli command that analyses all crates in the current workspace 2019-02-10 10:56:58 +01:00
ra_fmt Refactor formatting code out of ra_ida_api_light into ra_fmt. 2019-02-08 18:58:27 +01:00
ra_hir Spell cases explicitly in Ty::walk{_mut} 2019-02-10 12:35:30 +01:00
ra_ide_api reformat the world 2019-02-08 14:49:43 +03:00
ra_ide_api_light Refactor formatting code out of ra_ida_api_light into ra_fmt. 2019-02-08 18:58:27 +01:00
ra_lsp_server Implement BatchDatabase construction 2019-02-10 10:56:58 +01:00
ra_mbe reformat the world 2019-02-08 14:49:43 +03:00
ra_project_model Clean up a bit 2019-02-09 11:15:25 +01:00
ra_syntax Fix handling of literal patterns 2019-02-09 21:37:30 +01:00
ra_text_edit reformat the world 2019-02-08 14:49:43 +03:00
ra_tt move test 2019-01-31 22:23:30 +02:00
ra_vfs Clean up a bit 2019-02-10 11:48:59 +01:00
test_utils reformat the world 2019-02-08 14:49:43 +03:00
thread_worker reformat the world 2019-02-08 14:49:43 +03:00
tools reformat the world 2019-02-08 14:49:43 +03:00