From ae85d2dfb61ca1cacb953adfc0c8a30fd59bc09e Mon Sep 17 00:00:00 2001 From: Tiziano Santoro Date: Thu, 5 Nov 2015 14:32:43 +0000 Subject: [PATCH] Add dartfmt --- README.md | 3 +++ plugin/defaults.vim | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/README.md b/README.md index 3ffc7fc..d24a00f 100644 --- a/README.md +++ b/README.md @@ -136,6 +136,9 @@ Here is the link to the installation: https://golang.org/doc/install * `rustfmt` for __Rust__. It can be installed using `cargo`, the Rust package manager. Up-to-date installation instructions are on the project page: https://github.com/nrc/rustfmt/#installation. +* `dartfmt` for __Dart__. +Part of the Dart SDK (make sure it is on your PATH). See https://www.dartlang.org/tools/dartfmt/ for more info. + How can I change the behaviour of formatters, or add one myself? ---------------------------------------------------------------- If you need a formatter that is not among the defaults, or if you are not satisfied with the default formatting behaviour that is provided by vim-autoformat, you can define it yourself. diff --git a/plugin/defaults.vim b/plugin/defaults.vim index 3f4b65c..047b798 100644 --- a/plugin/defaults.vim +++ b/plugin/defaults.vim @@ -203,3 +203,11 @@ if !exists('g:formatters_rust') let g:formatters_rust = ['rustfmt'] endif +" Dart +if !exists('g:formatdef_dartfmt') + let g:formatdef_dartfmt = '"dartfmt"' +endif + +if !exists('g:formatters_dart') + let g:formatters_dart = ['dartfmt'] +endif