Languageclient-neovim: Goto and Rename not working with RLS

Created on 22 Aug 2017  Â·  24Comments  Â·  Source: autozimu/LanguageClient-neovim

So I have recently reinstalled my computer and ever since I haven't been able to get much useful stuff out of RLS. I went over the install guide a few times but I see nothing I could have missed. While syntax errors work sometimes, stuff like rename or goto never do. Until now I have just ignored it thinking that it might just be buggy right now but it has been bothering me a lot.

Any idea what I could try to make this work? Chances are the mistake is somewhere on my end, but I'd be glad if someone would still be able to help me out.

All 24 comments

Can you change log level (help) and resend the content of /tmp/LanguageClient.log please ?

That first part is the normal setting and at the bottom it's with the debug log level. There is info and debug. Is there any other log level not mentioned in the help?

Oh yes i'm sorry but some parts are missing. Can you change log level before starting the language server ?

The log is not complete.

Please follow steps to get a new complete log file

  • cleanup /tmp/LanguageClient.log
  • reopen neovim
  • set LanguageClient logging level
  • reproduce the issue
  • resend all content of /tmp/LanguageClient.log

I would also recommend you try a simple project, like https://github.com/autozimu/LanguageClient-neovim/tree/master/rplugin/python3/tests/sample-rs to see if it works.

I have a similar Problem. Nothing works. Only the autocompletion works. But not as it should, I guess. I set LanguageClientLoggingLevel to 'DEBUG'. This is the output:

$ cat /tmp/LanguageClient.log 
21:02:27 WARNING  no handler implemented for rustDocument_diagnosticsBegin
21:02:27 WARNING  register completion manager source failed. Error: NvimError(b'Error calling function.',)
21:02:30 WARNING  no handler implemented for rustDocument_diagnosticsEnd

@Ronaldho80 you should try to follow @autozimu steps because there is no debug messages in your output

I thought, I did. I cleaned the log file. I set the debugging level with:

let g:LanguageClient_setLoggingLevel = 'DEBUG'

in init.vim. I restarted and re-did what I did to generate Error messages.

LanguageClient_setLoggingLevel is a function, not a variable :smile:

So this is a bit odd. I tried it again with the simple issue and it didn't work. Then I cleared the log to give it a clean run of a single failed attempt and suddenly both goto and rename work. Without me changing anything at all.

Now it suddenly also works for a project where it did nothing at all before.

However one of my actually bigger projects still refuses to work, so here is the log for that project, not the minimal demo: https://pastebin.com/X8yyk6D9

I tried both goto and rename in this example. I'm sorry that this now got so odd and convoluted, I have no idea why suddenly part of my projects work. I'd still love to make it work for all my stuff tho.

It's a function call to set log level, not variable.

On Tue, Aug 22, 2017 at 12:12 Ronny Herzog notifications@github.com wrote:

I thought, I did. I cleaned the log file. I set the debugging level with:

let g:LanguageClient_setLoggingLevel = 'DEBUG'

in init.vim. I restarted and re-did what I did to generate Error messages.

—
You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
https://github.com/autozimu/LanguageClient-neovim/issues/107#issuecomment-324123840,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABYt7yze2nPMrd2fCRKobRcocG15aXaiks5saygwgaJpZM4O-_Iz
.

Ah! ;-) Thx, for the hint. Here is the log file: https://pastebin.com/2jJTzUq8

@chrisduerr the large projet that are you trying on is https://github.com/dogamak/xcbars ?

This seems to be an rls issue, but I will try to find it :smile:

Yeah exactly. I saw in the LC log that part of the other project was still in there, so here it's cleaned up: https://pastebin.com/6ZyLMJjs

Seems like it just does a whole lot of nothing to my untrained eye. Not sure if this might be an rls issue.

I tried the small Rust project in LanguageClient/.../sample-rs. Everything works as it should. My project is much bigger with 70000 loc. I wonder what's the problem though....

I think yes @Ronaldho80 rls doesn't handle well large projects for the moment :cry:

@Ronaldho80 and @chrisduerr can you try if renaming and definitions work on your projet if you use vscode ?

It is a bit late for me. I have to install it first. But I might try tomorrow and give some feedback.

Yeah I'd have to install and setup vscode first.

I installed VSCode with the Rust RLS plugin and everything works fine on my project. I tested the code completion, rename and hover function. They all work... not without flaws, though.

After a new re-installation for neovim, it works better. I have some code completion and goto-definition working on my project. However, hover and rename won't work.

The debug output has some strange errors, which probably come from RLS: https://pastebin.com/rxm911g8

@Ronaldho80 the logs shows that rls seems to fail to find RUST_SRC_PATH env variable, have you followed https://github.com/racer-rust/racer#configuration ?

Yes, RUST_SRC_PATH is correct. That makes it a strange error:

herzog@Elfriede:~/.vim 
$ env | grep RUST_SRC
RUST_SRC_PATH=/usr/local/src/rust/src

What I did then, is to set $RUST_SRC_PATH within init.vim:

let $RUST_SRC_PATH="/usr/local/src/rust/src"

Now, this error does not occur any more: https://pastebin.com/A5x3Mcgd

Dumb question, do you have Rust sources in it ?
ls /usr/local/src/rust/src

Closing as these are language servers incapable of handling complex projects.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DerWeh picture DerWeh  Â·  7Comments

ABitMoreDepth picture ABitMoreDepth  Â·  3Comments

macthecadillac picture macthecadillac  Â·  5Comments

mhuttner picture mhuttner  Â·  3Comments

norcalli picture norcalli  Â·  4Comments