Open Gogopex opened 1 month 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:![demo](https://github.com/user-attachments/assets/69e5b193-3b5f-4653-8a12-3a82614323cc)
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?