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

Remote Dev: Formatting on save still happens when disabled #20024

Open
1 task done
0x5b62656e5d opened this issue Oct 31, 2024 · 8 comments
Open
1 task done

Remote Dev: Formatting on save still happens when disabled #20024

0x5b62656e5d opened this issue Oct 31, 2024 · 8 comments
Labels
bug [core label] editor Feedback for code editing, formatting, editor iterations, etc remote dev Feedback for remote development servers setting Feedback for preferences, configuration, etc

Comments

@0x5b62656e5d
Copy link

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

Even though "format on save" is disabled in user settings, saving a file in a remote environment still formats the file.

  1. Disable formatting on save in user settings ("format_on_save": "off")
  2. Connect to remote/ssh
  3. Create a JS file
  4. Add some poorly indented code (or "unformatted" code)
  5. Save file

Environment

Macbook Pro M3, Sequoia 15.1
Remote host: Raspberry Pi 4B, Debian GNU/Linux 12 (Bookworm)

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your Zed.log file to this issue.

Zed.log
@0x5b62656e5d
Copy link
Author

Zed.log
Was not able to upload log when submitting the issue for some reason

@JosephTLyons JosephTLyons added editor Feedback for code editing, formatting, editor iterations, etc remote dev Feedback for remote development servers setting Feedback for preferences, configuration, etc and removed triage labels Nov 10, 2024
@exe-dealer
Copy link

in my case it helped to set "format_on_save": "off" in server settings file

@0x5b62656e5d
Copy link
Author

Even if I don't have a server settings file, it still should not format on save no? Based on local user settings?

@jameskozlowskimb
Copy link

I have run into the same issue when there is no config file on the remote. If I copy my config to the remote system then it works correctly. I would expect to not need to do this

@ConradIrwin
Copy link
Member

Hmm. We should fix this. At one point we used to sync all your local settings to the remote, but that caused problems for people who have language-server specific configuration.

I think we need to figure out which settings need to be synced more granularly and upload those; probably all formatting related things (like indent size, etc.); Also allow_binary_downloads when we ship that.

Any others that are top of mind?

@exe-dealer
Copy link

exe-dealer commented Nov 13, 2024

I think that root problem in case of 'format_on_save' is that it is 'on' by default. It corrupted all my uncomitted changes when i decided to try zed editor on my pet project.

@jameskozlowskimb
Copy link

Hmm. We should fix this. At one point we used to sync all your local settings to the remote, but that caused problems for people who have language-server specific configuration.

I think we need to figure out which settings need to be synced more granularly and upload those; probably all formatting related things (like indent size, etc.); Also allow_binary_downloads when we ship that.

Any others that are top of mind?

As there is the option to have a remote config file and a local one, I would expect it to respect the local one (even if it breaks things) unless I specifically make one on the remote system. That would be the more expected behaviour to me anyway.

@JosephTLyons JosephTLyons changed the title Fomatting on save still happens when disabled Remote Dev: Formatting on save still happens when disabled Dec 16, 2024
@justinmichaud
Copy link

I think that root problem in case of 'format_on_save' is that it is 'on' by default. It corrupted all my uncomitted changes when i decided to try zed editor on my pet project.

Just my 2 cents, I totally agree. This bug bit me as well. It would be nice to have the option to disable this setting based on the style guides of the repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug [core label] editor Feedback for code editing, formatting, editor iterations, etc remote dev Feedback for remote development servers setting Feedback for preferences, configuration, etc
Projects
No open projects
Archived in project
Development

No branches or pull requests

6 participants