Auto-Import icon indicating copy to clipboard operation
Auto-Import copied to clipboard

[feature request] Add option to favor absolute imports over relative imports

Open georggrab opened this issue 7 years ago • 1 comments

Hey there,

first of all, thanks for the awesome extension! It works beautifully. One thing bothers me though: I favor using absolute (relative to src/ directory) imports over relative ones. No '../../../' hell and easier to refactor / move around code, especially when working on larger projects.

I think such a feature would be quite easy to add:

  • Add configuration switch favorAbsoluteImports, which is a boolean value, defaults to false
  • Add configuration switch absoluteImportRoot, which is a string value, required if favorAbsoluteImports is true, maybe default to ${workSpaceRoot}/src/ as this is the most common configuration when using absolute imports

Does anyone think this feature would be useful as well? If so, I'd be willing to but some time into implementing it if someone could provide me some pointers as to where to start.

Cheers

georggrab avatar Apr 07 '18 19:04 georggrab

Yes, I want this too!

haight6716 avatar Apr 11 '18 22:04 haight6716