purescript-language-server icon indicating copy to clipboard operation
purescript-language-server copied to clipboard

Import formatting from code actions and formatting provider inconsistent

Open andys8 opened this issue 5 years ago • 2 comments

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.

andys8 avatar Sep 15 '20 22:09 andys8

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.

natefaubion avatar Sep 15 '20 22:09 natefaubion

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

andys8 avatar Sep 15 '20 22:09 andys8