fatih / vim-go

Go development plugin for Vim
https://www.patreon.com/bhcleek
Other
15.99k stars 1.45k forks source link

infoDefinitionHandler error while using fzf #2777

Closed konart closed 4 years ago

konart commented 4 years ago

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

  1. open a *.go file

  2. Open fzf.vim floating window for :Buffers\:Files\:Rg

What did you expect to happen?

Floating window opening without any issues

What happened instead?

Error detected while processing function 158_on_stdout[1]..158_neocb[58]..318[13]..320[26]..157_infoDefinitionHandler: line 2: E909: Cannot index a special variable Press ENTER or type command to continue

Everytime fzf.vim window is up - I get this error.

Configuration (MUST fill this out):

vim-go version:

v1.22

vimrc you used to reproduce (use a minimal vimrc with other plugins disabled; do not link to a 2,000 line vimrc):

vimrc

" Specify a directory for plugins
call plug#begin('~/.vim/plugged')

Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'tpope/vim-fugitive'
Plug 'junegunn/gv.vim'
Plug 'sodapopcan/vim-twiggy'
Plug 'jreybert/vimagit'
Plug 'tpope/vim-surround'
Plug 'airblade/vim-gitgutter'
Plug 'scrooloose/nerdtree'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'ryanoasis/vim-devicons'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'tpope/vim-commentary'
Plug 'dense-analysis/ale'
Plug 'tpope/vim-sleuth'
Plug 'liuchengxu/vim-clap', { 'do': ':Clap install-binary!' }
Plug 'jiangmiao/auto-pairs'
Plug 'majutsushi/tagbar'
Plug 'easymotion/vim-easymotion'
Plug 'diepm/vim-rest-console'

Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'

Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'lifepillar/vim-solarized8'
Plug 'ayu-theme/ayu-vim'
Plug 'rakr/vim-one'
Plug 'Yggdroot/duoduo'

Plug 'dbakker/vim-lint'

Plug 'godlygeek/tabular'
Plug 'elzr/vim-json'
Plug 'plasticboy/vim-markdown'

Plug 'airblade/vim-rooter'
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries', 'tag': 'v1.22' }

" Initialize plugin system
call plug#end()

" fzf
if has('nvim')
  "let $NVIM_TUI_ENABLE_TRUE_COLOR=1
  let $FZF_DEFAULT_OPTS .= ' --border --margin=0,5 --layout=reverse'

  function! FloatingFZF()
    let width = float2nr(&columns * 0.9)
    let height = float2nr(&lines * 0.6)
    let opts = { 'relative': 'editor',
               \ 'row': (&lines - height) / 2,
               \ 'col': (&columns - width) / 2,
               \ 'width': width,
               \ 'height': height }

    let win = nvim_open_win(nvim_create_buf(v:false, v:true), v:true, opts)
    call setwinvar(win, '&winhighlight', 'NormalFloat:Normal')
  endfunction

  let g:fzf_layout = { 'window': 'call FloatingFZF()' }
endif

autocmd! FileType fzf
autocmd  FileType fzf set laststatus=0 noshowmode noruler
  \| autocmd BufLeave  set laststatus=2 showmode ruler

" goyo && lime
let g:limelight_conceal_ctermfg = 'gray'

" gitgutter
set updatetime=200
set signcolumn=yes

"NERDCommenter
let g:NERDSpaceDelims = 1

" Tagbar
let g:tagbar_autofocus = 1

" nvim only
set clipboard+=unnamedplus

command! -bang -nargs=? -complete=dir Files
    \ call fzf#vim#files(, {'options': ['--layout=reverse', '--info=inline', '--preview', '~/.vim/plugged/fzf.vim/bin/preview.sh {}']}, 0)

set title

Vim version (first three lines from :version):

NVIM v0.4.3 Build type: Release LuaJIT 2.0.5

Go version (go version):

go version go1.14 darwin/amd64

Go environment

go env Output:

GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/konart/Library/Caches/go-build"
GOENV="/Users/konart/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GONOPROXY="gitlab.safecrow.ru"
GONOSUMDB="gitlab.safecrow.ru"
GOOS="darwin"
GOPATH="/Users/konart/build/go"
GOPRIVATE="gitlab.safecrow.ru"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/opt/go/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/opt/go/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/konart/build/safecrow/gateway/gateway-payments/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/6y/7v29j_w140jb9f_9tn90yrlm0000gp/T/go-build883172798=/tmp/go-build -gno-record-gcc-switches -fno-common"

gopls version

gopls version Output:

golang.org/x/tools/gopls v0.3.3
    golang.org/x/tools/gopls@v0.3.3 h1:mTFqRDJQmpSsgDDWvbtGnSva1z9uX2XcDszSWa6DhBQ=

vim-go configuration:

vim-go configuration
g:go_auto_type_info = 1
g:go_highlight_operators = 1
g:go_highlight_extra_types = 1
g:go_loaded_gosnippets = 1
g:go_highlight_function_calls = 1
g:go_highlight_fields = 1
g:go_highlight_variable_declarations = 1
g:go_highlight_variable_assignments = 1
g:go_highlight_format_strings = 1
g:go_highlight_function_arguments = 1
g:go_highlight_functions = 1
g:go_gotags_bin = 'gotags'
g:go_highlight_types = 1
g:go_fmt_command = 'goimports'
g:go_jump_to_error = 1
g:go_highlight_generate_tags = 1
g:go_loaded_install = 1
bhcleek commented 4 years ago

I can duplicate this with Neovim, but not with Vim. I wonder if this is deserves a bug report to Neovim. given that Neovim claims

Fully compatible with Vim's editing model and the Vimscript language.