You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 26, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 26, 2025. It is now read-only.
zig_fmt_autosave writes escape characters in the current buffer #105
This is on a completely clean neovim and zig install. Entering :w with a Zig file opened causes escape characters to be printed in the current buffer. This happens across all the terminal emulators I use (ghostty, wezterm, alacritty).
I've tried tons of things to figure this out and ended up figuring out (after trying 100x things) that setting vim.g.zig_fmt_autosave = 0 fixed the issue, although obviously at the cost of the auto-formatting on save. I ended up trying to debug zig.vim and found that the "guilty" line is https://github.com/ziglang/zig.vim/blob/master/ftplugin/zig.vim#L41. However, my zig env's output seeems clear.
I have the same issue.
After deleting all nvim chaches and re-installing it works for a short time before zig fmt starts throwing errors and slowing down massively on save. This happens both on windows 11 and ubuntu.
Activity
melenaus commentedon Jul 27, 2024
I have the same issue.
After deleting all nvim chaches and re-installing it works for a short time before zig fmt starts throwing errors and slowing down massively on save. This happens both on windows 11 and ubuntu.
Gogopex commentedon Jul 27, 2024
I fixed it locally by modifying zig.vim, but not sure if it's good enough to merge. I can open up the PR if anyone's interested.