Shougo / deoplete.nvim

:stars: Dark powered asynchronous completion framework for neovim/Vim8
Other
5.94k stars 295 forks source link

Deoplete hangs on .ipynb files #1179

Closed jonathf closed 3 years ago

jonathf commented 3 years ago

Problems summary

Deoplete slows down when inserting text in raw jupyter notebooks, (which is esentially JSON). We are talking about multiple seconds freeze. Lag also tends to linger after <c-c> into normal mode. Documents are small (<1000 lines).

Expected

neovim should not hang

Environment Information

health#nvim#check

Configuration

Performance

Remote Plugins

terminal

[clip]

Python 3 provider (optional)

Provide a minimal init.vim/vimrc with less than 50 lines (Required!)

let g:python3_host_prog = '~/.config/nvim/venv/bin/python'

call plug#begin()
Plug 'Shougo/deoplete.nvim', {'do': ':UpdateRemotePlugins'}
let g:deoplete#enable_at_startup = 1
call plug#end()

How to reproduce the problem from neovim/Vim startup (Required!)

Generate a logfile if appropriate

  1. export NVIM_PYTHON_LOG_FILE=/tmp/log
  2. export NVIM_PYTHON_LOG_LEVEL=DEBUG
  3. nvim -u minimal.vimrc
  4. some works
  5. cat /tmp/log_{PID}

Upload the log file

log_py3_rplugin.log

jonathf commented 3 years ago

I am realizing the document isn't as small as I thought. It has images embedded into it. Here is the file I was editing while generating the log: quadrature_integration.txt Rename to .ipynb.

Shougo commented 3 years ago

It seems very very long line is included in L90 and deoplete analysis it so it hangs. No magic.

Shougo commented 3 years ago

Documents are small (<1000 lines).

It does not mean real small. Very long lines are included.

jonathf commented 3 years ago

Yes, I realized the mistake after I posted. Thank you for looking into the issue, and the swift fix.