Languageclient-neovim: LanguageClientStart = E492: Not an editor command

Created on 14 Feb 2017  Â·  10Comments  Â·  Source: autozimu/LanguageClient-neovim

:PlugStatus

  • fzf: OK
  • deoplete.nvim: OK
  • LanguageClient-neovim: OK

I have a fresh neovim + python3 installation, and it _looks_ like LanguageClient installed correctly (OK).

Any idea why :LanguageClientStart gives an error? (E492)

Most helpful comment

Have you run :UpdateRemotePlugins + restart after installation?

If it still does not work, can you share the result of

cat ~/.local/share/nvim/rplugin.vim

running from your computer?

Edit: fix typo.

All 10 comments

Have you run :UpdateRemotePlugins + restart after installation?

If it still does not work, can you share the result of

cat ~/.local/share/nvim/rplugin.vim

running from your computer?

Edit: fix typo.

I would also run :CheckHealth I ran in to this as well with plugins and python3 not installed correctly. :PlugInstall! might also help clear up a few things.

@MarkSwanson Can you respond with updated result?

Sorry for the delay.

:UpdateRemovePlugins = error, not an editor command

$ cat ~/.local/share/nvim/rplugin.vim
" python3 plugins
call remote#host#RegisterPlugin('python3', '/home/maswanso/local/share/nvim/plugged/deoplete.nvim/rplugin/python3/deoplete', [
{'sync': v:true, 'name': '_deoplete', 'opts': {}, 'type': 'function'},
])

" ruby plugins

" python plugins

I then tried :PlugInstall! and it said some encouraging things about post-install work.
Still, after exiting and restarting nvim nothing above has changed.

@MarkSwanson Sorry, there was a typo in my previous comment.

It should be :UpdateRemotePlugins. It is a built-in command of neovim.

Can you try again and let me know the result?

:UpdateRemotePlugins

Encountered ImportError loading plugin at /home/maswanso/local/share/nvim/plugged/LanguageClient-neovim/rplugin/python3/LanguageClient: No module named 'typing'
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/neovim/plugin/host.py", line 131, in _load
module = imp.load_module(name, file, pathname, descr)
File "/usr/lib/python3.4/imp.py", line 245, in load_module
return load_package(name, filename)
File "/usr/lib/python3.4/imp.py", line 217, in load_package
return methods.load()
File "", line 1220, in load
File "", line 1200, in _load_unlocked
ImportError: No module named 'typing'
remote/host: python3 host registered plugins ['deoplete']
remote/host: generated rplugin manifest: /home/maswanso/.local/share/nvim/rplugin.vim

I did this: sudo pip3 install typing

Then :UpdateRemotePlugins worked.

:StartLanguageClient then says, "No language server commmand found for type: hercules."

That's a good sign.

By default, neovim does not recognize rust files. You meed tell it someway
that files with ".rs" suffix are rust files, not hercules.

Either put following line in your vimrc file

autocmd BufReadPost *.rs setlocal filetype=rust

or use plugin like https://github.com/rust-lang/rust.vim

On Thu, Feb 16, 2017 at 09:28 MarkSwanson notifications@github.com wrote:

:UpdateRemotePlugins

Encountered ImportError loading plugin at /home/maswanso/local/share/
nvim/plugged/LanguageClient-neovim/rplugin/python3/LanguageClient: No
module named 'typing'
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/neovim/plugin/host.py", line
131, in _load
module = imp.load_module(name, file, pathname, descr)
File "/usr/lib/python3.4/imp.py", line 245, in load_module
return load_package(name, filename)
File "/usr/lib/python3.4/imp.py", line 217, in load_package
return methods.load()
File "", line 1220, in load
File "", line 1200, in _load_unlocked
ImportError: No module named 'typing'
remote/host: python3 host registered plugins ['deoplete']
remote/host: generated rplugin manifest: /home/maswanso/.local/share/
nvim/rplugin.vim

I did this: sudo pip3 install typing

Then :UpdateRemotePlugins worked.

:StartLanguageClient then says, "No language server commmand found for
type: hercules."

—
You are receiving this because you commented.

Reply to this email directly, view it on GitHub
https://github.com/autozimu/LanguageClient-neovim/issues/6#issuecomment-280344357,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABYt717SvTeLdc1oaz9DoPFSvaZy_0dIks5rdFzwgaJpZM4MA-_l
.

Ok, since this was my first time using neovim I took some time to port my vim setup to neovim.
I also built (all tests pass) and started the Rust RLS server - and copied the correct save-analysis files into ${SYSROOT}/lib/save-analysis

I was able to get :LanguageClientStart to work - just documenting what I had to do in case it may help someone else...

If you get this error when calling :LanguageClientStart

error caught in async handler '/home/maswanso/local/share/nvim/plugged/LanguageClient-neovim/rplugin/python3/LanguageClient:command:LanguageClientStart []'
Traceback (most recent call last):
File "/home/maswanso/local/share/nvim/plugged/LanguageClient-neovim/rplugin/python3/LanguageClient/LanguageClient.py", line 147, in start
self.textDocument_didOpen()
File "/home/maswanso/local/share/nvim/plugged/LanguageClient-neovim/rplugin/python3/LanguageClient/LanguageClient.py", line 192, in textDocument_didOpen
"textDocument": textDocumentItem.__dict__
File "/home/maswanso/local/share/nvim/plugged/LanguageClient-neovim/rplugin/python3/LanguageClient/RPC.py", line 67, in notify
self.message(contentDict)
File "/home/maswanso/local/share/nvim/plugged/LanguageClient-neovim/rplugin/python3/LanguageClient/RPC.py", line 32, in message
self.outfile.write(message)
BrokenPipeError: [Errno 32] Broken pipe

the solution is to set the rls manifest path correctly. Example: change:
let g:LanguageClient_serverCommands = {
'rust': ['cargo', 'run', '--release', '--manifest-path=/opt/rls/Cargo.toml'],
}

into something real like:
let g:LanguageClient_serverCommands = {
'rust': ['cargo', 'run', '--release', '--manifest-path=/home/maswanso/src/external/rust/rls/Cargo.toml'],
}

After that (as long as your rls is compiled and passes tests) :LanguageClientStart worked for me.

Does completion use RLS? When I type:
some_option.^n
I get the wrong completion result - a hundred(?) completions show up in the list.

(also, feature request: I'd like the completions to show up when I type '.')
Edit: Ok, the deoplete docs state how to do this!
let g:deoplete#enable_at_startup = 1

  • Edit 2: it doesn't seem to be quite there - in other cases I get 1342 completions :-) in other cases I get only a partial list of completions. I will wait for RLS to improve over time.

Thanks!

Yes, completion is solely done by language servers. This plugin only acts like a UI/presentation layer.

For the suggestion of completion after '.', I will look into it when I got some time. Thanks.

Was this page helpful?
0 / 5 - 0 ratings