Vim-go: Error detected while processing function <SNR>28_register[9]..go#lsp#DidOpe n[9]..100[2]..<SNR>133_newlsp:

Created on 17 Jun 2019  路  1Comment  路  Source: fatih/vim-go

### What did you do? (required: The issue will be *closed when not provided)*
Opening a .go file

### What did you expect to happen?
Vim should open a .go file without error

### What happened instead?

Error detected while processing function 28_register[9]..go#lsp#DidOpe
n[9]..100[2]..133_newlsp:
line 281:
E117: Unknown function: go#job#Start
Error detected while processing function 28_register[9]..go#lsp#DidOpe
n[9]..100:
line 1:
E715: Dictionary required
E715: Dictionary required
"controllers/account.go" 3046L, 101771C
Error detected while processing function 28_register[9]..go#lsp#DidOpe
n[9]..100:
line 1:
E715: Dictionary required
E715: Dictionary required
E715: Dictionary required

Then after some researching, I tried to update go binaries with :GoInstallBinaries and I encountered the error below:

Error detected while processing function 28_GoInstallBinaries:
line 19:
E117: Unknown function: go#util#SetEnv
line 22:
E117: Unknown function: go#util#SetEnv
line 102:
E121: Undefined variable: Restore_path
E116: Invalid arguments for function call
line 103:
E121: Undefined variable: Restore_modules
E116: Invalid arguments for function call

Configuration (MUST fill this out):

#### vim-go version:

unplanned

IMPROVEMENTS:

  • Add a new option, g:go_code_completion_enabled, to control whether omnifunc
    is set.
    [GH-2229]
  • Use build tags with golangci-lint.
    [GH-2261]
  • Allow debugging of packages outside of GOPATH without a go.mod file.
    [GH-2269]
  • Show which example failed when Example tests fail
    [GH-2277]
  • Show function signature and return types in preview window when autocompleting functions and methods.
    [GH-2289]
  • Improve the user experience when using null modules.
    [GH-2300]
  • Add a new option, g:go_null_module_warning to silence the warning when
    trying to use gopls with a null module.
    [GH-2309]
  • Modify :GoReportGitHubIssue to include vim-go configuration values
    [GH-2323]
  • Respect g:go_info_mode='gopls' in go#complete#GetInfo.
    [GH-2313]
  • Allow :GoLint, :GoErrCheck, and :GoDebug to work in null modules.
    [GH-2335]
  • Change default value for g:go_info_mode and g:go_def_mode to 'gopls'.
    [GH-2329]
  • Add a new option, g:go_doc_popup_window to optionally use a popup window
    for godoc in Vim 8.1.1513 and later.
    [GH-2347]
  • Check for null modules in the background when initializing gopls.
    [GH-2351]

BUG FIXES:

  • display info about function and function types whose parameters are
    interface{} without truncating the function signature.
    [GH-2244]
  • install tools that require GOPATH mode when in module mode.
    [GH-2253]
  • Detect GOPATH when starting gopls
    [GH-2255]
  • Handle gopls responses in the same window from which the respective request
    originated.
    [GH-2266]
  • Show completion matches from gocode.
    [GH-2267]
  • Show the completion preview window.
    [GH-2268]
  • Set the anchor for method documentation correctly.
    [GH-2276]
  • Respect the LSP information for determining where candidate matches start.
    [GH-2291]
  • Restore environment variables with backslashes correctly.
    [GH-2292]
  • Modify handling of gopls output for :GoInfo to ensure the value will be
    displayed.
    [GH-2311]
  • Run :GoLint successfully in null modules.
    [GH-2318]
  • Ensure actions on save work in new buffers that have not yet been persisted to disk.
    [GH-2319]
  • Restore population of information in :GoReportGitHubIssue.
    [GH-2312]
  • Do not jump back to the originating window when jumping to definitions with
    g:go_def_mode='gopls'.
    [GH-2327]
  • Fix getting information about a valid identifier for which gopls returns no
    information (e.g. calling :GoInfo on a package identifier).
    [GH-2339]
  • Fix tab completion of package names on the cmdline in null modules.
    [GH-2342]

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

" Golang Plugins
Plug 'fatih/vim-go', {'do': ':GoInstallBinaries'}

"deoplete completion
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'wokalski/autocomplete-flow'
Plug 'Shougo/neosnippet'
Plug 'Shougo/neosnippet-snippets'
Plug 'roxma/nvim-yarp'
Plug 'roxma/vim-hug-neovim-rpc'
Plug 'copy/deoplete-ocaml'
Plug 'Shougo/neco-vim'
"Plug 'deoplete-plugins/deoplete-jedi'
Plug 'fszymanski/deoplete-emoji'
Plug 'tbodt/deoplete-tabnine', { 'do': './install.sh' }
Plug 'Shougo/neco-syntax'
Plug 'deoplete-plugins/deoplete-tag'

" Plugin outside ~/.vim/plugged with post-update hook
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }

"vim-go settings
let g:go_metalinter_autosave = 1
let g:go_test_show_name = 1
let g:go_play_browser_command = 'firefox-developer %URL% &'
let g:go_auto_type_info = 1
let g:go_auto_sameids = 1
let g:go_jump_to_error = 1
let g:go_fmt_autosave = 1
let g:go_fmt_command = "gofmt"
let g:go_mod_fmt_autosave = 1
let g:go_snippet_engine = "automatic"
let g:go_asmfmt_autosave = 1
let g:go_fold_enable = ['block', 'import', 'varconst', 'package_comment']
let g:go_debug = ["shell-commands","debugger-state","debugger-commands","lsp"]
let g:go_info_mode = 'gopls'
let g:go_fmt_fail_silently = 1
let g:go_fmt_experimental = 1
let g:go_def_mode = 'gopls'
let g:go_metalinter_autosave = 1
let g:go_highlight_functions = 1
let g:go_highlight_variable_declarations = 1
let g:go_highlight_variable_assignments = 1
let g:go_highlight_types = 1
let g:go_highlight_fields = 1
"let g:go_highlight_function_calls = 1
let g:go_highlight_function_parameters = 1
let g:go_highlight_functions = 1
let g:go_highlight_operators = 1

#### Vim version (first three lines from :version):
VIM - Vi IMproved 8.1 (2018 May 18, compiled Jun 07 2019 10:49:19)
Included patches: 1-875, 878, 884, 948, 1046, 1365
Modified by [email protected]

#### Go version (go version):
go version go1.12.6 linux/amd64

#### Go environment
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/adigun/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/adigun/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="/usr/bin/gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
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 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build889131433=/tmp/go-build -gno-record-gcc-switches"

>All comments

Fixed -- i removed ~/.vim folder and restarted vim

Was this page helpful?
0 / 5 - 0 ratings

Related issues

korjavin picture korjavin  路  4Comments

cassiobotaro picture cassiobotaro  路  3Comments

SirmaXX picture SirmaXX  路  3Comments

jongillham picture jongillham  路  3Comments

andrejvanderzee picture andrejvanderzee  路  3Comments