Vim-go: Option to disable quickfix/location list completely when showing linter errors

Created on 23 Feb 2018  路  1Comment  路  Source: fatih/vim-go

What did you do? (required. The issue will be closed when not provided.)

  1. I created a .vimrc file with the following contents:
call plug#begin('~/.vim/plugged')
Plug 'fatih/vim-go'
call plug#end()
  1. I started vim:
$ vim foo.go

This immediately inserted some code into the buffer:

package main

import "fmt"

func main() {
    fmt.Println("vim-go")
}
  1. I changed the code in the buffer to look like this:
package main

import "fmt"

func main() foo bar {
    fmt.Println("vim-go")
}
  1. I saved the buffer.

    What did you expect to happen?

Location list popping up. However, I expect to have a configuration option, that would allow me to disable it completely, while still running linting on file save. For example, in case of w0rp/ale, the location list (or quickfix) is not opened by default. If you want it to be opened, you have to set let g:ale_open_list = 1. Having something similar in vim-go would be great.

What happened instead?

Location list popped up.

Configuration (MUST fill this out):

  • Vim version (first two lines from :version):
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Feb 15 2018 14:50:58)
Included patches: 1-1428
  • Go version (go version):
go version go1.10 linux/386
  • Go environment (go env):
GOARCH="386"
GOBIN=""
GOCACHE="/home/ayurchuk/.cache/go-build"
GOEXE=""
GOHOSTARCH="386"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/ayurchuk/.gopath"
GORACE=""
GOROOT="/usr/lib/go"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_386"
GCCGO="gccgo"
GO386="sse2"
CC="i686-pc-linux-gnu-gcc"
CXX="i686-pc-linux-gnu-g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m32 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build665961117=/tmp/go-build -gno-record-gcc-switches"
  • vim-go version:
commit cc0467c3c567b9e95a694f160f2d5cd1cd21dad4
  • vimrc you used to reproduce (use a minimal vimrc with other plugins disabled; do not link to a 2,000 line vimrc):
call plug#begin('~/.vim/plugged')
Plug 'fatih/vim-go'
call plug#end()

This is somewhat related to #989 and #1628

Most helpful comment

Looks like what I need can be achieved by setting let g:go_fmt_fail_silently = 1.

>All comments

Looks like what I need can be achieved by setting let g:go_fmt_fail_silently = 1.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

andrejvanderzee picture andrejvanderzee  路  3Comments

MattFlower picture MattFlower  路  4Comments

zhangjing picture zhangjing  路  3Comments

joeblubaugh picture joeblubaugh  路  3Comments

mnarrell picture mnarrell  路  3Comments