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

add documentation for zig fmt #1523

Open
andrewrk opened this issue Sep 13, 2018 · 7 comments
Open

add documentation for zig fmt #1523

andrewrk opened this issue Sep 13, 2018 · 7 comments
Labels
contributor friendly This issue is limited in scope and/or knowledge of Zig internals. docs zig fmt
Milestone

Comments

@andrewrk
Copy link
Member

andrewrk commented Sep 13, 2018

extracted from #367

  • how to build it / it's part of stage2 but stage2 is not done yet
  • why there are no configurable settings
  • turn zig fmt : on/ off d21a192
  • integration into vim
  • integration into vscode
  • it supports stdin/stdout, individual files, directories, and multiple arguments. writes to stdout the files modified
@andrewrk andrewrk added the docs label Sep 13, 2018
@andrewrk andrewrk added this to the 0.4.0 milestone Sep 13, 2018
@ghost
Copy link

ghost commented Sep 15, 2018

integration into vim

would be nice to support more than vim, much like zig should not be linux first, It should not be vim first, one could argue that vim and linux user base probably overlap significantly

so zig should support probably all of

  • VSC (which somehow everyone seems to use and probably has the best out of the box tooling, python debuggers, cpp integration etc etc so users expect this)
  • atom
  • sublime
  • vim
    -emacs

with fmt, highlighting, autocomplete(later) at least
and maybe even refactoring support(later) as far as possible (sublime can be a bit of a crutch maybe)

ref ziglang/sublime-zig-language#7

golang has excellent sublime plugin which alone helps tremendously, compared to the hassle of setting up a compilation database for cpp etc.....

rust tooling is another benchmark by which you have to compare editor support

@Hejsil
Copy link
Sponsor Contributor

Hejsil commented Sep 15, 2018

@monouser7dig I think what he means with "integration into vim" is to show an example of how to integrate zig fmt into a text editor. zig fmt is not designed for any editor. It's just a command line tool like any other.

Edit: I do agree that we should have zig fmt on all these editors, but I'm pretty sure that's a community effort :)

@ghost
Copy link

ghost commented Sep 15, 2018

zig fmt is not designed for any editor. It's just a command line tool like any other.

sure

I think he already has a plugin for vim if I'm not mistaken (I could though)
https://github.com/ziglang/zig.vim

let g:zig_fmt_autosave = 1
let g:zig_fmt_command = ['zig2', 'fmt', '--color', 'off']

@andrewrk
Copy link
Member Author

Yeah, @tiehuis put all that effort into making zig fmt work with vim so I just wanted to point that out. The docs section on zig fmt would mention all the editors/IDEs that have zig fmt integration available.

I do agree @monouser7dig that the fact that we currently only have integration with vim, shows a bit of bias in the user base. I hope to correct that by improving tooling on Windows, most notably with #615.

@Hejsil
Copy link
Sponsor Contributor

Hejsil commented Sep 15, 2018

I think the vscode extension have fmt support. At least the readme implies so.

@andrewrk
Copy link
Member Author

Great! I will also mention that in the zig fmt docs.

@ghost
Copy link

ghost commented Sep 15, 2018

most notably with #615.

this will be a huge improvement for me personally at least, I'll just use whatever editor supports it, currently on sublime but vim is okay as well and if vscode is where the money is...I'll go with that.

If you have a new language, this just makes it just so much faster to get into it.


OT:
atom seems a bit on the dead side, there is currently xray in development and on the off chance of derailing this discussion I'd like to give a hint to Andrew because he's developing this shared audio workstation and it just happens to be the case that xray will support shared editing...but essentially shared anything https://github.com/atom/xray/blob/master/docs/updates/2018_09_14.md

As long as an application can send and receive operations and feed them into this library, it should be capable of real-time collaboration with other applications.

@andrewrk andrewrk modified the milestones: 0.4.0, 0.5.0 Mar 22, 2019
@andrewrk andrewrk modified the milestones: 0.5.0, 0.6.0 Sep 20, 2019
@andrewrk andrewrk added the contributor friendly This issue is limited in scope and/or knowledge of Zig internals. label Dec 9, 2019
@andrewrk andrewrk modified the milestones: 0.6.0, 0.7.0 Dec 9, 2019
@andrewrk andrewrk modified the milestones: 0.7.0, 0.8.0 Oct 10, 2020
@andrewrk andrewrk modified the milestones: 0.8.0, 0.9.0 Nov 6, 2020
@andrewrk andrewrk modified the milestones: 0.9.0, 0.10.0 May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor friendly This issue is limited in scope and/or knowledge of Zig internals. docs zig fmt
Projects
None yet
Development

No branches or pull requests

2 participants