Open Gogopex opened 4 months ago
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.
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.
Heya,
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).
Quick recording:
The escape characters inserted:
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, myzig env
's output seeems clear.Has anyone had that issue? Am I going crazy?