From e3760a58dcba6466111abb1d529f04f31d299856 Mon Sep 17 00:00:00 2001 From: Fatih Arslan Date: Sun, 28 May 2017 00:19:59 +0300 Subject: [PATCH] fmt: add support of 'go_list_type' for :GoFmt and :GoImports fixes #1303 --- autoload/go/fmt.vim | 2 +- doc/vim-go.txt | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/autoload/go/fmt.vim b/autoload/go/fmt.vim index edddb4b3ab..4cb080e907 100644 --- a/autoload/go/fmt.vim +++ b/autoload/go/fmt.vim @@ -222,7 +222,7 @@ endfunction " show_errors opens a location list and shows the given errors. If the given " errors is empty, it closes the the location list function! s:show_errors(errors) abort - let l:listtype = "locationlist" + let l:listtype = go#list#Type("locationlist") if !empty(a:errors) call go#list#Populate(l:listtype, a:errors, 'Format') echohl Error | echomsg "Gofmt returned error" | echohl None diff --git a/doc/vim-go.txt b/doc/vim-go.txt index fdc48d2cb4..8d8fee696a 100644 --- a/doc/vim-go.txt +++ b/doc/vim-go.txt @@ -1382,9 +1382,10 @@ explicitly overrides this behavior. For standard Vim behavior, set it to 10. < *'g:go_list_type'* -Specifies the type of list to use. The default value (empty) will use the -appropriate kind of list for the command that was called. Supported values are -"", "quickfix", and "locationlist". > +Specifies the type of list to use for command outputs (such as errors from +builds, results from static analysis commands, etc...). The default value +(empty) will use the appropriate kind of list for the command that was called. +Supported values are "", "quickfix", and "locationlist". > let g:go_list_type = "" <