Skip to content
This repository has been archived by the owner on Mar 26, 2021. It is now read-only.

NeoVim hangs after the completion #6

Open
YingboMa opened this issue Nov 25, 2016 · 21 comments
Open

NeoVim hangs after the completion #6

YingboMa opened this issue Nov 25, 2016 · 21 comments

Comments

@YingboMa
Copy link

NeoVim hangs forever after the completion pops up.
screen-shot-2016-11-24-at-3 11 13-pm

@oxinabox
Copy link
Member

Could you try disableing all your other plugins, except
this and deomplete?

I can't think for sure how they could be interfering, but lets rule that out first.

@YingboMa
Copy link
Author

YingboMa commented Dec 6, 2016

I finally find out the cause of it. It only happens when I enable the super tab behavior of neosnippet plugin.


" SuperTab like snippets behavior.
   imap <expr><TAB> neosnippet#expandable_or_jumpable() ?
   \ "\<Plug >(neosnippet_expand_or_jump)"
   \: pumvisible() ? "\<C-n>" : "\<TAB>"
   smap <expr><TAB> neosnippet#expandable_or_jumpable() ?
   \ "\<Plug >(neosnippet_expand_or_jump)"
   \: "\<TAB>"

@oxinabox
Copy link
Member

oxinabox commented Dec 7, 2016

I can indeed reproduce that.
If you change it to:

"Super tab like snippet behavour
inoremap <expr><TAB>
 \ pumvisible() ? "\<C-n>" :
 \ neosnippet#expandable_or_jumpable() ?
 \    "\<Plug>(neosnippet_expand_or_jump)" : "\<TAB>"
snoremap <expr><TAB> neosnippet#expandable_or_jumpable() ?
\ "\<Plug>(neosnippet_expand_or_jump)" : "\<TAB>"

it works, without hanging.
I believe the call of \<TAB> causes an infinite loop.
So noremap stops the map triggering maps.
But I am not sure if that is behavior you are relying on.

@Shougo may have some insight on this.

@Shougo
Copy link

Shougo commented Dec 7, 2016

I believe the call of \<TAB> causes an infinite loop.

I think so, too.
I will check it.

@Shougo
Copy link

Shougo commented Dec 8, 2016

I have tested it with the minimal init.vim.
But I cannot reproduce it :-(

@YingboMa Please create the minimal init.vim and reproduce ways from neovim starting.
I will test it.

@YingboMa
Copy link
Author

YingboMa commented Dec 8, 2016

This is my minimal init.vim that can reproduce the problem.

" Plugins
call plug#begin('~/.vim/plugged')
 Plug 'Shougo/deoplete.nvim'
 Plug 'JuliaEditorSupport/deoplete-julia'
 Plug 'JuliaEditorSupport/julia-vim'
 Plug 'Shougo/neosnippet.vim'
 Plug 'Shougo/neosnippet-snippets'
call plug#end()

" Snippets
  let g:neosnippet#enable_snipmate_compatibility = 1
  let g:neosnippet#expand_word_boundary = 1
  imap <C-k>     <Plug>(neosnippet_expand_or_jump)
  smap <C-k>     <Plug>(neosnippet_expand_or_jump)
  xmap <C-k>     <Plug>(neosnippet_expand_target)

" SuperTab like snippets behavior.
  imap <expr><TAB> neosnippet#expandable_or_jumpable() ?
    \ "\<Plug >(neosnippet_expand_or_jump)"
    \: pumvisible() ? "\<C-n>" : "\<TAB>"
    smap <expr><TAB> neosnippet#expandable_or_jumpable() ?
    \ "\<Plug >(neosnippet_expand_or_jump)"
    \: "\<TAB>"

Then, use NeoVim to open a xxx.jl file and type

function <TAB>

Neovim will freeze.

@Shougo
Copy link

Shougo commented Dec 8, 2016

OK. I will test it.

@oxinabox
Copy link
Member

oxinabox commented Dec 8, 2016

julia.vim also binds the TAB key, doesn't it -- for latex/unicode subsitutions.

@Shougo when reproducing, the hang might not occur until deoplete-julia has finished generating its completions lists from the julia standard libraries. Which might take 5 minutes from first startup.

@YingboMa does changing to using nore maps fix it for you?
And does this break something else?

@Shougo
Copy link

Shougo commented Dec 12, 2016

I cannot reproduce the minimal init.vim and the reproduce ways.

I think it should be:

" Plugins
call plug#begin('~/.vim/plugged')
 Plug 'Shougo/deoplete.nvim'
 Plug 'JuliaEditorSupport/deoplete-julia'
 Plug 'JuliaEditorSupport/julia-vim'
 Plug 'Shougo/neosnippet.vim'
 Plug 'Shougo/neosnippet-snippets'
call plug#end()

" Snippets
  let g:deoplete#enable_at_startup = 1
  let g:neosnippet#enable_snipmate_compatibility = 1
  let g:neosnippet#expand_word_boundary = 1
  imap <C-k>     <Plug>(neosnippet_expand_or_jump)
  smap <C-k>     <Plug>(neosnippet_expand_or_jump)
  xmap <C-k>     <Plug>(neosnippet_expand_target)

" SuperTab like snippets behavior.
  imap <expr><TAB> neosnippet#expandable_or_jumpable() ?
    \ "\<Plug>(neosnippet_expand_or_jump)"
    \: pumvisible() ? "\<C-n>" : "\<TAB>"
    smap <expr><TAB> neosnippet#expandable_or_jumpable() ?
    \ "\<Plug>(neosnippet_expand_or_jump)"
    \: "\<TAB>"

@YingboMa
Copy link
Author

@oxinabox No, it did not fix the problem.

@Shougo
Copy link

Shougo commented Dec 14, 2016

Your minimal init.vim works for me.
So, it is not problem...

@YingboMa
Copy link
Author

YingboMa commented Dec 14, 2016

@Shougo I tried it again. It still hangs... By the way, did you install Julia language?
bildschirmfoto 2016-12-14 um 18 37 03

@Shougo
Copy link

Shougo commented Dec 14, 2016

Yes. Julia completion works well.

@dragon788
Copy link

Anything system locale specific that could be causing this? Try setting the current shell locale to En.UTF-8 and see if it still happens and then switch back to whatever your current system locale is?

@YingboMa
Copy link
Author

@dragon788 Thank you for the advice. Unfortunately, it still does not fix the problem.

@elsuizo
Copy link

elsuizo commented Dec 15, 2016

i got the same problem. If disabled 'JuliaEditorSupport/julia-vim'
deoplete-julia works

@elsuizo
Copy link

elsuizo commented Dec 15, 2016

confirm using old 'JuliaEditorSupport/julia-vim' like this:
https://github.com/ajpaulson/julia-syntax.vim
all works fine again

@Shougo
Copy link

Shougo commented Dec 16, 2016

Is this 'JuliaEditorSupport/julia-vim' problem?
But I cannot reproduce it.
You can find the reason though...

@YingboMa
Copy link
Author

It still hangs after I use 'ajpaulson/julia-syntax.vim'.....

@oxinabox
Copy link
Member

I've been away, but am back now.
I really thought noremap would eliminate it.

It seems like all @elsuizo and @YingboMa have different problems,
since @elsuizo can solve by using the older version 'ajpaulson/julia-syntax.vim without the Tab based latex replacement feature (right?)
and @YingboMa can not solve it this way (Unless there was a mistake in removing the old version? I've made that mistake before).

Are both using same minimal rc?

I am pretty sure this comes down to the
SuperTab like snippets behavior.
If that section is removed it from vimrc it all goes away, right?

@YingboMa
Copy link
Author

@oxinabox Exactly, it doesn't have that problem after I remove it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants