deoplete-ternjs
deoplete-ternjs copied to clipboard
Error editing any JS file after updating
Updated via Vim Plug :PlugUpdate
and now am seeing the following when I open a JS file and start typing:
Request from non-main thread.
Requests from different threads should be wrapped with nvim.async_call(cb, ...)
File "/usr/local/Cellar/[email protected]/3.8.6/Frameworks/Python.framework/Versions/3.8/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/usr/local/Cellar/[email protected]/3.8.6/Frameworks/Python.framework/Versions/3.8/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/Users/michael/.config/nvim/plugged/deoplete-ternjs/rplugin/python3/deoplete/sources/ternjs.py", line 336, in completation
self.vim.command('call deoplete#auto_complete()')
File "/usr/local/lib/python3.8/site-packages/pynvim/api/nvim.py", line 287, in command
return self.request('nvim_command', string, **kwargs)
When I run a :checkhealth
:
health#deoplete#check
========================================================================
## deoplete.nvim
- OK: exists("v:t_list") was successful
- OK: has("timers") was successful
- OK: has("python3") was successful
- OK: Require Python 3.6.1+ was successful
- OK: Require msgpack 1.0.0+ was successful
- INFO: If you're still having problems, try the following commands:
- $ export NVIM_PYTHON_LOG_FILE=/tmp/log
- $ export NVIM_PYTHON_LOG_LEVEL=DEBUG
- $ nvim
- $ cat /tmp/log_{PID}
- and then create an issue on github
health#nvim#check
========================================================================
## Configuration
- OK: no issues found
## Performance
- OK: Build type: Release
## Remote Plugins
- OK: Up to date
## terminal
- INFO: key_backspace (kbs) terminfo entry: key_backspace=^H
- INFO: key_dc (kdch1) terminfo entry: key_dc=\E[3~
- INFO: $TERM_PROGRAM='iTerm.app'
- INFO: $COLORTERM='truecolor'
health#provider#check
========================================================================
## Clipboard (optional)
- OK: Clipboard tool found: pbcopy
## Python 2 provider (optional)
- INFO: `g:python_host_prog` is not set. Searching for python2 in the environment.
- INFO: Executable: /usr/bin/python2
- INFO: Python version: 2.7.16
- INFO: pynvim version: 0.4.2
- OK: Latest pynvim is installed.
## Python 3 provider (optional)
- INFO: `g:python3_host_prog` is not set. Searching for python3 in the environment.
- INFO: Multiple python3 executables found. Set `g:python3_host_prog` to avoid surprises.
- INFO: Executable: /usr/local/bin/python3
- INFO: Other python executable: /usr/bin/python3
- INFO: Python version: 3.8.6
- INFO: pynvim version: 0.4.2
- OK: Latest pynvim is installed.
## Ruby provider (optional)
- INFO: Ruby: ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin19]
- INFO: Host: /Users/michael/.local/share/rbenv/shims/neovim-ruby-host
- OK: Latest "neovim" gem is installed: 0.8.1
## Node.js provider (optional)
- INFO: Node.js: v14.13.1
- INFO: Neovim node.js host: /usr/local/lib/node_modules/neovim/bin/cli.js
- OK: Latest "neovim" npm/yarn package is installed: 4.9.0
not sure where is the issue but right now I don't have time to review, if you have knowledge of python please create a PR
Same issue hereI'm getting the same issue and has made it completely impossible to edit JS files. apparently connected to this line
I could trace this back to this change in deoplete:
https://github.com/Shougo/deoplete.nvim/commit/f439759515703b608d16f55b5f6f19fc9cdb52ba
Apparently deoplete-ternjs only works when in multi-threaded mode.
However, you can simply re-enable that with the following in your vimrc:
call deoplete#custom#option('num_processes', 4)
Someone might want to put the above somewhere in the README.md.
But let's hope deoplete keeps supporting this as it had problems with multi-threading in the past:
https://github.com/Shougo/deoplete.nvim/issues/761