Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import formatting from code actions and formatting provider inconsistent #98

Open
andys8 opened this issue Sep 15, 2020 · 2 comments
Open
Labels

Comments

@andys8
Copy link
Contributor

andys8 commented Sep 15, 2020

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
Copy link
Contributor

natefaubion commented Sep 15, 2020

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
Copy link
Contributor Author

andys8 commented Sep 15, 2020

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

@nwolverson nwolverson changed the title Import List: New line will be added and removed Import formatting from code actions and formatting provider inconsistent Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants