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

Not being able to save a document #25802

Open
BlueriteSoul opened this issue Feb 28, 2025 · 3 comments
Open

Not being able to save a document #25802

BlueriteSoul opened this issue Feb 28, 2025 · 3 comments
Labels

Comments

@BlueriteSoul
Copy link

Summary

I just want to be able to save the document (ctrl+s), but hitting this shortcut literally does the opposite -> undoes any changes since last save. Strangely, even if I do File-Save, it does the same thing. Is this intended behaviour?
Possibly related to: #24643

Steps to trigger the problem:

  1. open a document
  2. make some changes
  3. hit ctrl+s or file-save
  4. zed undoes all changes

Actual Behavior:
undoing unsaved changes
Expected Behavior:
saving changes

Zed Version and System Specs

Zed: v0.175.6 (Zed)
OS: Linux Wayland arch unknown
Memory: 15.2 GiB
Architecture: x86_64
GPU: Intel(R) Iris(R) Plus Graphics (ICL GT2) || Intel open-source Mesa driver || Mesa 24.3.4-arch1.1

@CharlesChen0823

This comment has been minimized.

@devzeth devzeth added the linux label Feb 28, 2025
@BlueriteSoul

This comment has been minimized.

@notpeter
Copy link
Member

Your keybind looks fine.

Do you have a formatter configured in your Zed user settings (~/.config/zed/settings.json) or project settings (.zed/settings.json)? Can you paste the relevant lines? (note formatter can be defined both globally (a bad idea) and under the languages.WhateverLand (a good idea).

A misconfigured formatter combined with format_on_save can trigger odd behaviors. Zed expects custom formatters to be configured to read from stdin and write to stdout and not directly touch the filesystem. See more here: https://zed.dev/docs/configuring-zed#formatter

Does it save correctly if you run workspace: save without format from the command palette (ctrl-shift-p)?

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

4 participants