Open andys8 opened 4 years ago
I'd consider this a bug in purty. It should probably format imports the way the ide does, or at least not reformat it. IDE import formatting is controlled by purs ide
, not the language server.
Ah, that's why I didn't manage to find it in the source code 😄
I created an issue in the purty
repo. From the perspective of the purescript-language-server
it's an inconsistency issue between two third party integrations.
Triggering a completion will add a new line after
import Prelude
.Formatting it with the formatting provider (and
purty
) will remove the new line:So importing and formatting on save will constantly have jumping code lines: Adding the new line and removing it.