b952c270ee
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> |
||
---|---|---|
.. | ||
gen_lsp_server | ||
ra_arena | ||
ra_assists | ||
ra_batch | ||
ra_cli | ||
ra_db | ||
ra_fmt | ||
ra_hir | ||
ra_ide_api | ||
ra_ide_api_light | ||
ra_lsp_server | ||
ra_mbe | ||
ra_project_model | ||
ra_syntax | ||
ra_text_edit | ||
ra_tt | ||
ra_vfs | ||
test_utils | ||
thread_worker | ||
tools |