Skip to content

Commit 0325c5e

Browse files
authored
Specifies the type of list to use in GoMetaLinter, by go_list_type (#1309)
1 parent aab6381 commit 0325c5e

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

autoload/go/lint.vim

+7-3
Original file line numberDiff line numberDiff line change
@@ -251,16 +251,20 @@ function s:lint_job(args)
251251
function! s:callback(chan, msg) closure
252252
let old_errorformat = &errorformat
253253
let &errorformat = l:errformat
254-
caddexpr a:msg
254+
if l:listtype == "locationlist"
255+
lad a:msg
256+
elseif l:listtype == "quickfix"
257+
caddexpr a:msg
258+
endif
255259
let &errorformat = old_errorformat
256260

257261
" TODO(jinleileiking): give a configure to jump or not
258262
let l:winnr = winnr()
259263

260-
copen
264+
let errors = go#list#Get(l:listtype)
265+
call go#list#Window(l:listtype, len(errors))
261266

262267
exe l:winnr . "wincmd w"
263-
264268
endfunction
265269

266270
function! s:exit_cb(job, exitval) closure

0 commit comments

Comments
 (0)