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

set "quiet: true" to zig fmt build script #36

Closed
anosovic opened this issue Apr 16, 2020 · 5 comments · May be fixed by #61
Closed

set "quiet: true" to zig fmt build script #36

anosovic opened this issue Apr 16, 2020 · 5 comments · May be fixed by #61

Comments

@anosovic
Copy link

anosovic commented Apr 16, 2020

if format on save is on, then zig fmt will run. when it does, "[Finished in 0.4s]" will pop up at the bottom

the formatter shouldnt need to pop open a console window on every save. setting "quiet: true" in the .sublime-build script for zig fmt fixes this

@emekoi
Copy link
Contributor

emekoi commented Apr 18, 2020

adding the quiet flag still causes an empty panel to show but "show_panel_on_build": false in your sublime settings will hide the panel by deafult. i can also add view.window().run_command("hide_panel") to automatically hide the panel, but i don't know if other users will like that.

edit:
i introduced a config option for automatically hiding the panel.

@emekoi emekoi closed this as completed in e8f68cd Apr 18, 2020
@anosovic
Copy link
Author

ah, didn't realize that--this is the default functionality of the package

thanks for the tip and modification

@emekoi
Copy link
Contributor

emekoi commented Apr 19, 2020

np, i just pushed a new release with the option to autohide the panel if you set zig.quiet to true.

@travisstaloch
Copy link

I figured out that I needed to add a ~/.config/sublime-text/Packages/User/Zig.sublime-settings file in order to add the "zig.quiet": true option. And after doing this, the bottom panel does not pop up anymore after saving/fmt. This is good.

However now the panel never pops up, even when there are build errors.

@emekoi I propose to make this flag only apply when the command is 'fmt'. Does this sound reasonable? If so, is it possible? I'm looking at Zig.py and not sure how to check if the command is a fmt. Any ideas? I would gladly make a pr if I could figure out how to do this.

Also, if we can do this, I suggest making zig.quiet default to true to avoid this annoying panel popup on every save.

@travisstaloch
Copy link

travisstaloch commented Nov 8, 2021

I'm sure I missed something @emekoi . It looks like your commit to address this sets "quiet": true for the fmt commands. Any idea why the panel would still pop up after every save (before adding the "zig.quiet": true setting)?

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

Successfully merging a pull request may close this issue.

3 participants