Skip to content
This repository was archived by the owner on Nov 26, 2025. It is now read-only.
This repository was archived by the owner on Nov 26, 2025. It is now read-only.

unable to use anyzig together with zig.vim #112

@giganteous

Description

@giganteous

Hi,

I'm a vim (neovim) user, using this plugin directly, together with (since a few weeks) anyzig for selecting the correct zig version automatically. Anyzig prints out a header on STDERR, which gets inserted into the formatted zig code on write:

anyzig: zig version '0.14.0' pulled from '/home/kai/git/thirdparty/huniq/build.zig.zon'
anyzig: appdata '/home/kai/.local/share/anyzig'
anyzig: zig '0.14.0' already exists at '/home/kai/.cache/zig/p/N-V-__8AANS1ihIOtIbwStI19vHd9274HDAeXLQjJFgZzdsY'
<the rest of the zig code here>

It seems vim.zig's formatting doesn't handle the STDERR separately of STDOUT.

I would suggest a patch so zig fmt's STDERR gets redirected to a tmpfile, and only parsing that for errors on non-zero exit codes, but I'm quite new to this project and how it's related to neovim and vim itself. Is this (project) the right place to suggest a fix?

(This bug was initially reported in anyzig as marler8997/anyzig#20, but didn't belong there)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions