11[ ![ Travis Build Status] ( https://travis-ci.org/google/vim-codefmt.svg?branch=master )] ( https://travis-ci.org/google/vim-codefmt )
22
3- codefmt is a utility for syntax-aware code formatting. It contains several
3+ codefmt is a utility for syntax-aware code formatting. It contains several
44built-in formatters, and allows new formatters to be registered by other
55plugins.
66
77# Supported File-types
88
9- * [ Bazel] ( https://www.github.com/bazelbuild/bazel ) BUILD files (buildifier)
10- * C, C++ (clang-format)
11- * [ Clojure] ( https://clojure.org/ ) ([ zprint] ( https://github.com/kkinnear/zprint ) ,
12- [ cljstyle] ( https://github.com/greglook/cljstyle ) )
13- * CSS, Sass, SCSS, Less (js-beautify)
14- * Dart (dartfmt)
15- * Fish ([ fish_indent] ( https://fishshell.com/docs/current/commands.html#fish_indent ) )
16- * Go (gofmt)
17- * [ GN] ( https://www.chromium.org/developers/gn-build-configuration ) (gn)
18- * HTML (js-beautify)
19- * Java (google-java-format or clang-format)
20- * JavaScript (clang-format or [ prettier] ( https://prettier.io ) )
21- * JSON (js-beautify)
22- * Kotlin ([ ktfmt] ( https://github.com/facebookincubator/ktfmt ) )
23- * Proto (clang-format)
24- * Python (Autopep8, Black, Isort or YAPF)
25- * Rust ([ rustfmt] ( https://github.com/rust-lang/rustfmt ) )
26- * TypeScript (clang-format)
27- * Shell (shfmt)
28- * [ Vue] ( http://vuejs.org ) (prettier)
29- * Nix (nixpkgs-fmt)
9+ - [ Bazel] ( https://www.github.com/bazelbuild/bazel ) BUILD files (buildifier)
10+ - C, C++ (clang-format)
11+ - [ Clojure] ( https://clojure.org/ ) ([ zprint] ( https://github.com/kkinnear/zprint ) ,
12+ [ cljstyle] ( https://github.com/greglook/cljstyle ) )
13+ - CSS, Sass, SCSS, Less (js-beautify)
14+ - Dart (dartfmt)
15+ - Fish ([ fish_indent] ( https://fishshell.com/docs/current/commands.html#fish_indent ) )
16+ - Go (gofmt)
17+ - [ GN] ( https://www.chromium.org/developers/gn-build-configuration ) (gn)
18+ - HTML (js-beautify)
19+ - Java (google-java-format or clang-format)
20+ - JavaScript (clang-format or [ prettier] ( https://prettier.io ) )
21+ - JSON (js-beautify)
22+ - Kotlin ([ ktfmt] ( https://github.com/facebookincubator/ktfmt ) )
23+ - Proto (clang-format)
24+ - Python (Autopep8, Black, Isort or YAPF)
25+ - Rust ([ rustfmt] ( https://github.com/rust-lang/rustfmt ) )
26+ - TypeScript (clang-format)
27+ - Shell (shfmt)
28+ - [ Vue] ( http://vuejs.org ) (prettier)
29+ - Nix (nixpkgs-fmt)
3030
3131# Commands
3232
@@ -121,21 +121,21 @@ Assume a filetype `myft` and a formatter called `MyFormatter`. Our detailed
121121guide to creating a formatter [ lives
122122here] ( https://github.com/google/vim-codefmt/wiki/Formatter-Integration-Guide ) .
123123
124- * Create an issue for your new formatter and discuss!
124+ - Create an issue for your new formatter and discuss!
125125
126- * Create a new file in ` autoload/codefmt/myformatter.vim ` See
126+ - Create a new file in ` autoload/codefmt/myformatter.vim ` See
127127 `autoload/codefmt/buildifier.vim for an example. This is where all the
128128 logic for formatting goes.
129129
130- * Register the formatter in
130+ - Register the formatter in
131131 [ plugin/register.vim] ( plugin/register.vim )
132132 with:
133133
134134 ``` vim
135135 call s:registry.AddExtension(codefmt#myformatter#GetFormatter())
136136 ```
137137
138- * Create a flag in
138+ - Create a flag in
139139 [instant/flags.vim](instant/flags.vim)
140140
141141 ```vim
@@ -144,7 +144,7 @@ here](https://github.com/google/vim-codefmt/wiki/Formatter-Integration-Guide).
144144 call s:plugin.Flag('myformatter_executable', 'myformatter')
145145 ```
146146
147- * Update the README.md to mention your new filetype!
147+ - Update the README.md to mention your new filetype!
148148
149149That's it! Of course, the complicated step is in the details of
150150`myformatter.vim`.
0 commit comments