Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to Go lang #472

Closed
bon-ami opened this issue Aug 22, 2019 · 8 comments
Closed

failed to Go lang #472

bon-ami opened this issue Aug 22, 2019 · 8 comments

Comments

@bon-ami
Copy link

bon-ami commented Aug 22, 2019

current lsp.
nvim 0.3.8 on windows 10

open a go file, on opening & saving, it complains,

Error detected while processing function <SNR>166_on_text_document_did_save[5]..<SNR>166_ensure_flush[1]..lsp#utils#step#start[1]..<SNR>205_next[9]..<lambda>62[1]..<SNR>166_ensure_start[33]..lsp#client#start[1]..<SNR>206_lsp_start:
line 5:
E117: Unknown function: async#job#start
E15: Invalid expression: async#job#start(a:opts.cmd, { 'on_stdout': function('s:on_stdout'), 'on_stderr': function('s:on_stderr'), 'on_exit': function('s:on_exit'), })

part of my init.vim

"ale
let g:ale_completion_enabled = 1

"lsp
if executable('gopls')
    au User lsp_setup call lsp#register_server({
        \ 'name': 'gopls',
        \ 'cmd': {server_info->['gopls', '-mode', 'stdio']},
        \ 'whitelist': ['go'],
        \ })
    autocmd BufWritePre *.go LspDocumentFormatSync
endif

"neomake
" When writing a buffer (no delay).
let g:neomake_open_list = 2
let g:neomake_serialize = 1
let g:neomake_serialize_abort_on_error = 1

"airline for ale
let g:airline#extensions#ale#enabled = 1

"jira-vim
"let g:jiraVimDomainName = "http://jira.fihbdc.com:8080"
"let g:jiraVimEmail = "weiyangxie@fih-foxconn.com"
"let g:jiraVimToken = ""

"plug
call plug#begin('~\AppData\local\nvim\plugged')
Plug 'vim-airline/vim-airline'
Plug 'neomake/neomake'
"Plug 'paulkass/jira-vim'
Plug 'dense-analysis/ale'
Plug 'fatih/vim-go'
Plug 'prabirshrestha/async.vim'
Plug 'prabirshrestha/vim-lsp'
call plug#end()

"neomake
call neomake#configure#automake('w')

**my other plugins**
AutoComplPop	
bufexplorer	
calendar	
DirDiff	
EasyGrep	
fencview	
fugitive	
fzf	
fzf.vim	
git_shade	
gundo	
indent-guides	
ingo	
matchit	
Nerd_Commenter	
NERD_tree	
obvious-resize	
rainbow_parentheses	
sessionman	
SrcExpl	
tabular	
tagbar	
taglist	
Trinity	
undotree	
vim-mark	
vim-markdown	
visualmark	
Vjde	
winmanager	
YankRing	
@bon-ami
Copy link
Author

bon-ami commented Aug 22, 2019

when I use :LspCodeAction or other :Lsp*, it says go not supported.

@thomasfaingnaert
Copy link
Collaborator

It seems you haven't installed async.vim. Did you run :PlugInstall after adding it to your vimrc?

@bon-ami
Copy link
Author

bon-ami commented Aug 22, 2019

After async.cim installed, no errors. But it does not function as expected. (I am using gopls.exe)
I came to use this because of fatih/vim-go#685 to show popup parameter info when typing.
But now it still does not show anything when typing. If :LspHover on a function name, it shows info on preview window above. I want it to be a popup window automatically.
lsp
Thank you for quick response

@thomasfaingnaert
Copy link
Collaborator

Do you mean that the parameter info is not displayed in the statusline? If so, that's not a feature of vim-lsp. LspHover opens in the preview window, or the floating/popup window on newer (Neo)vim.

@bon-ami
Copy link
Author

bon-ami commented Aug 23, 2019

since I am using the current stable version of neovim, I thought it should open a popup/floating window instead of preview window

@thomasfaingnaert
Copy link
Collaborator

Have you set g:lsp_preview_float to 1?

@clason
Copy link
Contributor

clason commented Aug 23, 2019

Doesn't floating window require neovim v0.4.x (i.e., building from master or using nightlies)? It's not in stable (v.0.3.8) yet.

@bon-ami
Copy link
Author

bon-ami commented Aug 27, 2019

Doesn't floating window require neovim v0.4.x (i.e., building from master or using nightlies)? It's not in stable (v.0.3.8) yet.

correct. solved. perfect support from you guys. thanks a lot

@bon-ami bon-ami closed this as completed Aug 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants