-
Notifications
You must be signed in to change notification settings - Fork 0
Neovim: Error caught in request handler of autocmd after opening scala file #363
Description
Yes, I've seen #340 but it doesn't help.
I also couldn't find any helpful in the Getting Started and Troubleshooting page of Ensime.
I installed Neovim as told here for Ubuntu 16.04.
I also installed websocket-client, sexpdata and neovim python package for both python 2.7 and 3.5.
Here is the neovim :version command:
:version
NVIM 0.2.0-dev
Build type: RelWithDebInfo
Compilation: /usr/bin/x86_64-linux-gnu-gcc -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -g -DDISABLE_LOG -Wall -Wextra -pedantic
-Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -DHAVE_CONFIG_H -D_GNU_SOURCE -I/build/neovim-RVcgEA/neovim-0.
1.5ubuntu1+git201701011530+3003+22~ubuntu16.04.1/build/config -I/build/neovim-RVcgEA/neovim-0.1.5ubuntu1+git201701011530+3003+22~ubuntu16.04.1/src -I/build/neovim-RVcgEA/neovim-0.1.5ubuntu1+git20170101153
0+3003+22~ubuntu16.04.1/.deps/usr/include -I/build/neovim-RVcgEA/neovim-0.1.5ubuntu1+git201701011530+3003+22~ubuntu16.04.1/.deps/usr/include -I/build/neovim-RVcgEA/neovim-0.1.5ubuntu1+git201701011530+3003
+22~ubuntu16.04.1/.deps/usr/include -I/build/neovim-RVcgEA/neovim-0.1.5ubuntu1+git201701011530+3003+22~ubuntu16.04.1/.deps/usr/include -I/build/neovim-RVcgEA/neovim-0.1.5ubuntu1+git201701011530+3003+22~ub
untu16.04.1/.deps/usr/include -I/build/neovim-RVcgEA/neovim-0.1.5ubuntu1+git201701011530+3003+22~ubuntu16.04.1/.deps/usr/include -I/usr/include -I/build/neovim-RVcgEA/neovim-0.1.5ubuntu1+git201701011530+3
003+22~ubuntu16.04.1/build/src/nvim/auto -I/build/neovim-RVcgEA/neovim-0.1.5ubuntu1+git201701011530+3003+22~ubuntu16.04.1/build/include
Compiled by root@lgw01-55
Optional features included (+) or not (-): +acl +iconv +jemalloc +tui
For differences from Vim, see :help vim-differences
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/share/nvim"
In Neovim, the command echo has('python')
returns 1
and the command echo has('python3')
also returns 1.
My init.vim ->
call plug#begin('~/.config/nvim/plugged')
Plug 'ensime/ensime-vim'
Plug 'derekwyatt/vim-scala' , {'for' : 'scala'}
call plug#end()
which I then called the following commands in Neovim:
:w
:source %
:PlugInstall
:UpdateRemotePlugins
The result of :UpdateRemotePlugins
is:
:UpdateRemotePlugins
remote/host: python host registered plugins ['ensime.py']
remote/host: generated rplugin manifest: /home/konstantinos/.local/share/nvim/rplugin.vim
In my scala project, I'm using sbt version 0.13.7.
I put the line addSbtPlugin("org.ensime" % "sbt-ensime" % "1.12.5")
in ~/.sbt/0.13/plugins/plugins.sbt
Afterwards, I compiled the project with sbt compile
and generated the .ensime
file with sbt ensimeConfig
.
The command sbt ensimeConfig
seemed to work, but there were a few failed downloads for the netlib-native
package. However, that doesn't seem like a fatal problem.
Right after opening a scala file in my project with neovim, I get the following error:
Error detected while processing CursorMoved Auto commands for "*.scala":
error caught in request handler '/home/konstantinos/.config/nvim/plugged/ensime-vim/rplugin/python/ensime.py:autocmd:CursorMoved:*.scala ['src/main/scala/ca/crim/deti/re/evaluation/WikidataValidator.scala
']':
Traceback (most recent call last):
File "/home/konstantinos/.config/nvim/plugged/ensime-vim/rplugin/python/ensime.py", line 181, in au_cursor_moved
super(NeovimEnsime, self).au_cursor_moved(*args, **kwargs)
File "/home/konstantinos/.config/nvim/plugged/ensime-vim/ensime_shared/ensime.py", line 21, in wrapper2
create_client=create_client)
File "/home/konstantinos/.config/nvim/plugged/ensime-vim/ensime_shared/ensime.py", line 93, in current_client
create_client=create_client)
File "/home/konstantinos/.config/nvim/plugged/ensime-vim/ensime_shared/ensime.py", line 103, in client_for
client = self.create_client(config_path)
File "/home/konstantinos/.config/nvim/plugged/ensime-vim/ensime_shared/ensime.py", line 115, in create_client
The rplugin manifest in ~/.local/share/nvim/rplugin.vim :
" python3 plugins
" ruby plugins
" python plugins
call remote#host#RegisterPlugin('python', '/home/konstantinos/.config/nvim/plugged/ensime-vim/rplugin/python/ensime.py', [
\ {'sync': v:true, 'name': 'BufLeave', 'type': 'autocmd', 'opts': {'pattern': '*.scala', 'eval': 'expand("<afile>")'}},
\ {'sync': v:true, 'name': 'CursorHold', 'type': 'autocmd', 'opts': {'pattern': '*.scala', 'eval': 'expand("<afile>")'}},
\ {'sync': v:true, 'name': 'CursorMoved', 'type': 'autocmd', 'opts': {'pattern': '*.scala', 'eval': 'expand("<afile>")'}},
\ {'sync': v:true, 'name': 'VimEnter', 'type': 'autocmd', 'opts': {'pattern': '*.scala', 'eval': 'expand("<afile>")'}},
\ {'sync': v:true, 'name': 'VimLeave', 'type': 'autocmd', 'opts': {'pattern': '*.scala', 'eval': 'expand("<afile>")'}},
\ {'sync': v:true, 'name': 'EnAddImport', 'type': 'command', 'opts': {'nargs': '*', 'range': ''}},
\ {'sync': v:true, 'name': 'EnClients', 'type': 'command', 'opts': {'nargs': '0', 'range': ''}},
\ {'sync': v:true, 'name': 'EnDebugBacktrace', 'type': 'command', 'opts': {'nargs': '*', 'range': ''}},
\ {'sync': v:true, 'name': 'EnDebugClearBreaks', 'type': 'command', 'opts': {'nargs': '*', 'range': ''}},
\ {'sync': v:true, 'name': 'EnDebugContinue', 'type': 'command', 'opts': {'nargs': '*', 'range': ''}},
\ {'sync': v:true, 'name': 'EnDebugNext', 'type': 'command', 'opts': {'nargs': '*', 'range': ''}},
\ {'sync': v:true, 'name': 'EnDebugSetBreak', 'type': 'command', 'opts': {'nargs': '*', 'range': ''}},
\ {'sync': v:true, 'name': 'EnDebugStart', 'type': 'command', 'opts': {'nargs': '*', 'range': ''}},
\ {'sync': v:true, 'name': 'EnDebugStep', 'type': 'command', 'opts': {'nargs': '*', 'range': ''}},
\ {'sync': v:true, 'name': 'EnDebugStepOut', 'type': 'command', 'opts': {'nargs': '*', 'range': ''}},
\ {'sync': v:true, 'name': 'EnDeclaration', 'type': 'command', 'opts': {'nargs': '*', 'range': ''}},
\ {'sync': v:true, 'name': 'EnDeclarationSplit', 'type': 'command', 'opts': {'nargs': '*', 'range': ''}},
\ {'sync': v:true, 'name': 'EnDocBrowse', 'type': 'command', 'opts': {'nargs': '*', 'range': ''}},
\ {'sync': v:true, 'name': 'EnDocUri', 'type': 'command', 'opts': {'nargs': '*', 'range': ''}},
\ {'sync': v:true, 'name': 'EnInline', 'type': 'command', 'opts': {'nargs': '*', 'range': ''}},
\ {'sync': v:true, 'name': 'EnInspectType', 'type': 'command', 'opts': {'nargs': '*', 'range': ''}},
\ {'sync': v:true, 'name': 'EnInstall', 'type': 'command', 'opts': {'nargs': '*', 'range': ''}},
\ {'sync': v:true, 'name': 'EnOrganizeImports', 'type': 'command', 'opts': {'nargs': '*', 'range': ''}},
\ {'sync': v:true, 'name': 'EnShowPackage', 'type': 'command', 'opts': {'nargs': '*', 'range': ''}},
\ {'sync': v:true, 'name': 'EnRename', 'type': 'command', 'opts': {'nargs': '*', 'range': ''}},
\ {'sync': v:true, 'name': 'EnSuggestImport', 'type': 'command', 'opts': {'nargs': '*', 'range': ''}},
\ {'sync': v:true, 'name': 'EnSearch', 'type': 'command', 'opts': {'nargs': '*', 'range': ''}},
\ {'sync': v:true, 'name': 'EnSymbol', 'type': 'command', 'opts': {'nargs': '*', 'range': ''}},
\ {'sync': v:true, 'name': 'EnSymbolByName', 'type': 'command', 'opts': {'nargs': '*', 'range': ''}},
\ {'sync': v:true, 'name': 'EnToggleFullType', 'type': 'command', 'opts': {'nargs': '*', 'range': ''}},
\ {'sync': v:true, 'name': 'EnToggleTeardown', 'type': 'command', 'opts': {'nargs': '*', 'range': ''}},
\ {'sync': v:true, 'name': 'EnType', 'type': 'command', 'opts': {'nargs': '*', 'range': ''}},
\ {'sync': v:true, 'name': 'EnTypeCheck', 'type': 'command', 'opts': {'nargs': '*', 'range': ''}},
\ {'sync': v:true, 'name': 'EnCompleteFunc', 'type': 'function', 'opts': {}},
\ {'sync': v:true, 'name': 'EnPackageDecl', 'type': 'function', 'opts': {}},
\ ])