zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
47.04k stars 2.7k forks source link

[LINUX][Golang] Clear file when use CTRL + S #17018

Open devalexandre opened 2 weeks ago

devalexandre commented 2 weeks ago

Check for existing issues

Describe the bug / provide steps to reproduce it

When I try save golang file, the file is clear

2024-08-28 15-01-22

Environment

Zed: v0.150.4 (Zed) OS: Linux X11 arcolinux unknown Memory: 15.5 GiB Architecture: x86_64 GPU: NVIDIA GeForce RTX 2060 || NVIDIA || 550.100

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
2024-08-28T15:05:04.280625428-03:00 [INFO] Initializing default prettier with plugins {}
2024-08-28T15:05:04.280671704-03:00 [INFO] starting language servers for Go: gopls
2024-08-28T15:05:04.642473108-03:00 [INFO] Language server with id 0 sent unhandled notification LogMessage:
{
  "level": 0,
  "message": "[DEBUG] [agent] [2024-08-28T18:05:04.636Z] Telemetry initialized",
  "metadataStr": "[DEBUG] [agent] [2024-08-28T18:05:04.636Z]",
  "extra": [
    "Telemetry initialized"
  ]
}
2024-08-28T15:05:04.84943977-03:00 [INFO] add connection to peer
2024-08-28T15:05:04.849480105-03:00 [INFO] add_connection;
2024-08-28T15:05:04.849514169-03:00 [INFO] waiting for server hello
2024-08-28T15:05:04.859424044-03:00 [INFO] got server hello
2024-08-28T15:05:04.859473837-03:00 [INFO] set status to connected (connection id: ConnectionId { owner_id: 0, id: 0 }, peer id: PeerId { owner_id: 502, id: 977250 })
2024-08-28T15:05:04.8595235-03:00 [INFO] set status on client 182977: Connected { peer_id: PeerId { owner_id: 502, id: 977250 }, connection_id: ConnectionId { owner_id: 0, id: 0 } }
2024-08-28T15:05:07.009698045-03:00 [INFO] found user-installed language server for Go. path: "/home/alexandre/.gvm/pkgsets/go1.22/global/bin/gopls", arguments: ["-mode=stdio"]
2024-08-28T15:05:07.009765441-03:00 [INFO] starting language server. binary path: "/home/alexandre/.gvm/pkgsets/go1.22/global/bin/gopls", working directory: "/home/alexandre/projects/opensource/langflowgo", args: ["-mode=stdio"]
2024-08-28T15:05:07.165675529-03:00 [WARN] unhandled capability registration: Registration { id: "workspace/didChangeConfiguration", method: "workspace/didChangeConfiguration", register_options: None }
2024-08-28T15:05:23.451833433-03:00 [INFO] Creating a descriptor pool for at most 16 sets
2024-08-28T15:05:23.469176457-03:00 [INFO] Creating a descriptor pool for at most 16 sets
2024-08-28T15:05:23.502378253-03:00 [INFO] Creating a descriptor pool for at most 256 sets
2024-08-28T15:05:23.519298247-03:00 [INFO] Creating a descriptor pool for at most 256 sets
2024-08-28T15:07:16.916605122-03:00 [WARN] Generic lsp request to gopls failed: no type definition for string
2024-08-28T15:07:16.958583221-03:00 [INFO] Initializing default prettier with plugins {}
2024-08-28T15:07:16.958680342-03:00 [INFO] starting language servers for Go: gopls
2024-08-28T15:07:18.007083775-03:00 [ERROR] no worktree found for diagnostics path "/home/alexandre/.gvm/gos/go1.22/src/builtin/builtin.go"

JeetChhatrala commented 2 weeks ago

Happened to me also today. Saved the file and closed tab. So the the code in not even in buffer to undo (Ctrl + Z).

My two days of written code gone woshh!!. My mistake i was using zed on production project. Really frustrating.