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 zig fmt support #4198

Merged
merged 3 commits into from
May 16, 2022
Merged

Add zig fmt support #4198

merged 3 commits into from
May 16, 2022

Conversation

arashm
Copy link
Contributor

@arashm arashm commented May 12, 2022

Not sure if I have done everything correctly, but tried to follow the other PRs, and tests pass as well. I tested it locally and it seems formatting files just fine.
Let me know of the issues or you can also edit the changes directly.

doc/ale-zig.txt Show resolved Hide resolved
doc/ale-zig.txt Outdated Show resolved Hide resolved
doc/ale-zig.txt Outdated Show resolved Hide resolved
@hsanson
Copy link
Contributor

hsanson commented May 16, 2022

There are some linter issues, apply these changes to get them fixed:

diff --git a/doc/ale-supported-languages-and-tools.txt b/doc/ale-supported-languages-and-tools.txt
index 890a9091..738f1434 100644
--- a/doc/ale-supported-languages-and-tools.txt
+++ b/doc/ale-supported-languages-and-tools.txt
@@ -661,8 +661,8 @@ Notes:
 * Zeek
   * `zeek`!!
 * Zig
+  * `zigfmt`
   * `zls`
-  * `zig fmt`
 
 ===============================================================================
   vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
diff --git a/doc/ale-zig.txt b/doc/ale-zig.txt
index 3c675bdc..cafa12a1 100644
--- a/doc/ale-zig.txt
+++ b/doc/ale-zig.txt
@@ -9,10 +9,10 @@ Integration Information
 
 
 ===============================================================================
-zigfmt                                                        *ale-zig-zigfmt*
+zigfmt                                                         *ale-zig-zigfmt*
 
-g:ale_zig_zigfmt_executable                      *g:ale_zig_zigfmt_executable*
-                                                 *b:ale_zig_zigfmt_executable*
+g:ale_zig_zigfmt_executable                       *g:ale_zig_zigfmt_executable*
+                                                  *b:ale_zig_zigfmt_executable*
   Type: |String|
   Default: `'zig'`
 
diff --git a/doc/ale.txt b/doc/ale.txt
index 97a9c361..3b445265 100644
--- a/doc/ale.txt
+++ b/doc/ale.txt
@@ -3285,8 +3285,8 @@ documented in additional help files.
   zeek....................................|ale-zeek-options|
     zeek..................................|ale-zeek-zeek|
   zig.....................................|ale-zig-options|
-    zls...................................|ale-zig-zls|
     zigfmt................................|ale-zig-zigfmt|
+    zls...................................|ale-zig-zls|
 
 
 ===============================================================================
diff --git a/supported-tools.md b/supported-tools.md
index 67f608da..592faad7 100644
--- a/supported-tools.md
+++ b/supported-tools.md
@@ -670,5 +670,5 @@ formatting.
 * Zeek
   * [zeek](http://zeek.org) :floppy_disk:
 * Zig
+  * [zigfmt](https://github.com/ziglang/zig)
   * [zls](https://github.com/zigtools/zls)
-  * [zig fmt](https://github.com/ziglang/zig)

@arashm
Copy link
Contributor Author

arashm commented May 16, 2022

Applied the changes form the linter now.

@arashm arashm requested a review from hsanson May 16, 2022 20:41
Copy link
Contributor

@hsanson hsanson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Looks good.

@hsanson hsanson merged commit 3d7b3a6 into dense-analysis:master May 16, 2022
cyyever pushed a commit to cyyever/ale that referenced this pull request Jul 11, 2022
* Add zig fmt support

* Review changes

* Fix linter errors
cyyever pushed a commit to cyyever/ale that referenced this pull request Jul 11, 2022
* Add zig fmt support

* Review changes

* Fix linter errors
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 this pull request may close these issues.

None yet

2 participants