nwolverson / purescript-language-server

MIT License
184 stars 42 forks source link

Import formatting from code actions and formatting provider inconsistent #98

Open andys8 opened 4 years ago

andys8 commented 4 years ago

Triggering a completion will add a new line after import Prelude. image

image

Formatting it with the formatting provider (and purty) will remove the new line:

image

So importing and formatting on save will constantly have jumping code lines: Adding the new line and removing it.

natefaubion commented 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.

andys8 commented 4 years ago

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.

https://gitlab.com/joneshf/purty/-/issues/210