Skip to content

Commit

Permalink
Merge pull request #1211 from cespare/goimports-options
Browse files Browse the repository at this point in the history
Respect go_fmt_options when running goimports
  • Loading branch information
fatih authored Feb 19, 2017
2 parents 4490a1f + ded4d31 commit 2fc67cd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions autoload/go/fmt.vim
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,9 @@ function! s:fmt_cmd(bin_name, source, target)
" start constructing the command
let cmd = [bin_path]
call add(cmd, "-w")
call extend(cmd, split(g:go_fmt_options, " "))

if a:bin_name != "goimports"
call extend(cmd, split(g:go_fmt_options, " "))
else
if a:bin_name == "goimports"
" lazy check if goimports support `-srcdir`. We should eventually remove
" this in the future
if !exists('b:goimports_vendor_compatible')
Expand Down

0 comments on commit 2fc67cd

Please sign in to comment.