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

Renames new zig files as *.zig.z #376

Open
linker-err0r opened this issue Jan 3, 2025 · 2 comments
Open

Renames new zig files as *.zig.z #376

linker-err0r opened this issue Jan 3, 2025 · 2 comments

Comments

@linker-err0r
Copy link

linker-err0r commented Jan 3, 2025

Prerequisites:

  • VSCode Extension
  • ZLS Server

Reproduction Steps:

  1. Create a new file (ctrl/cmd-n).
  2. Use the save file command (ctrl/cmd-s).
  3. Use the system file dialogue to name the file "test.zig" and click "Create File" (or OS equivalent)

Expected Result:
The file is saved as "test.zig"

Actual Result:
Extension renames the file to "test.zig.z"

Notes:
One thing that’s notable is that this only happens when the format is supposed to be inferred by the file extension (by adding .zig at the end). If I explicitly click zig in the dropdown menu it does not occur. It does not occur for non-Zig files. It does occur on every file type if I click “No Extension” in the dropdown menu.

System info:
Zig 0.13
Zig Extension v0.63

VS Code Info:
Version: 1.96.2 (Universal)
Commit: fabdb6a30b49f79a7aba0f2ad9df9b399473380f
Date: 2024-12-19T10:22:47.216Z
Electron: 32.2.6
ElectronBuildId: 10629634
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Darwin arm64 24.1.0

@Vexu
Copy link
Member

Vexu commented Jan 4, 2025

One thing that’s notable is that this only happens when the format is supposed to be inferred by the file extension (by adding .zig at the end).

So this doesn't happen if you disable the extension?

I cannot reproduce this on Linux. Do you put something in the file? Do you specify the language?

@linker-err0r
Copy link
Author

I wasn't able to reproduce this on windows either. It seems to be an issue unique to mac. I'll do some more experiments on it tomorrow to see if I can narrow down the cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants