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

disableFormatting removes lines on save #632

Closed
bubba169 opened this issue Jan 30, 2021 · 2 comments
Closed

disableFormatting removes lines on save #632

bubba169 opened this issue Jan 30, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@bubba169
Copy link

Using VSCode with the Haxe extension I've been trying to disable auto formatting on save. The IDE setting is being ignored and when setting { "disableFormatting": true } it deletes the new line after the imports on every save. It will continue deleting lines on each save until there's nothing after the imports.

@bubba169
Copy link
Author

I've found I had a workspace setting enabling format on save. After setting that to false, the line is still removed on save with disableFormatting set, however, replacing the hxformat.json content with {} successfully disables the auto format. This works for my situation but still sounds like a bug as lines shouldn't be removed.

@AlexHaxe
Copy link
Member

yeah, I've noticed it myself some days ago, but didn't really investigate it.

it seems to be related to sorting imports when formatting is not fully configured. so putting

{
    "editor.codeActionsOnSave": {
        "source.sortImports": false
    }
}

will also make it stop.

I'm not sure if it's a formatter or languageserver bug, but it's very likely code that I wrote, so I'll have to look at it either way.

@AlexHaxe AlexHaxe added the bug Something isn't working label Jan 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants