Skip to content

Implement automatic import insertion for completions

Jan Belle requested to merge auto-imports into master

This merge request extends the functionality of ImportAwareCrossrefProposalProvider such that missing import statements are added automatically when accepting a completion proposal. New import statements are inserted in alphabetical order of the imported namespaces.

The new ImportInserter is now also used in the implementation of the already existing quickfix for adding missing imports. The former quickfix implementation using semantic modifications caused issues in a few cases, see e.g. #145 (closed).

Fixes #145 (closed)

Merge request reports

Loading