Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rct-complete error in vim8 #6

Closed
jonahx opened this issue Dec 13, 2017 · 12 comments
Closed

rct-complete error in vim8 #6

jonahx opened this issue Dec 13, 2017 · 12 comments

Comments

@jonahx
Copy link

jonahx commented Dec 13, 2017

I've successfully installed deoplete and deoplete-rct on macvim 8.0, and I'm getting the following error as I type inside a ruby file:

rct-complete-error

The relevant part of my .vimrc looks like:

Plugin 'roxma/vim-hug-neovim-rpc'
Plugin 'roxma/nvim-yarp'
Plugin 'Shougo/deoplete.nvim'
Plugin 'Shougo/deoplete-rct'
let g:deoplete#enable_at_startup = 1
let g:deoplete#enable_yarp = 1

I've verified that the command rct-complete works on my cmd line. Am I missing any steps?

@Shougo
Copy link
Owner

Shougo commented Dec 13, 2017

I cannot reproduce the problem.

set rtp+=~/.cache/dein/repos/github.com/Shougo/deoplete.nvim/
set rtp+=~/.cache/dein/repos/github.com/Shougo/deoplete-rct/
set rtp+=~/.cache/dein/repos/github.com/roxma/nvim-yarp/
set rtp+=~/.cache/dein/repos/github.com/roxma/vim-hug-neovim-rpc/

let g:deoplete#enable_at_startup = 1

filetype plugin indent on

Please test the above vimrc and the reproduce ways from Vim starting.
If you don't upload them, I will close it.
Because it works for me.

@Shougo
Copy link
Owner

Shougo commented Dec 13, 2017

And please upload :messages result.

@jonahx
Copy link
Author

jonahx commented Dec 13, 2017

Thanks for the fast reply.

I want to clarify, I did not install using dein, and ~/.cache/dein does not exist on my system. Should I still attempt the above test?

@Shougo
Copy link
Owner

Shougo commented Dec 13, 2017

Please change the path to the vim-plug installed plugin path.

@jonahx
Copy link
Author

jonahx commented Dec 13, 2017

I just tested with the following ".vimrc" (my installs were done using vundle):

set pythonthreedll=/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/Python
set rubydll=/usr/local/Cellar/ruby/2.4.2_1/lib/libruby.2.4.dylib
set luadll=/usr/local/Cellar/lua/5.3.4_2/lib/liblua.dylib

set rtp+=~/.vim/bundle/vim-hug-neovim-rpc/
set rtp+=~/.vim/bundle/nvim-yarp/
set rtp+=~/.vim/bundle/deoplete.nvim/
set rtp+=~/.vim/bundle/deoplete-rct/
let g:deoplete#enable_at_startup = 1
let g:deoplete#enable_yarp = 1
  1. The error I originally posted about in this issue still occurs.
  2. Perhaps related, and I should have mentioned before, but even if I comment out "deoplete-rct" line, deoplete's suggestions are slow -- they take about 5 seconds to appear, even on small files. I'm on a 16G RAM MB Pro.

Any ideas?

Thanks again.

@Shougo
Copy link
Owner

Shougo commented Dec 13, 2017

Please upload the reproduce ways frorm Vim8 starting.
I cannot reproduce the problem.

Perhaps related, and I should have mentioned before, but even if I comment out "deoplete-rct" line, deoplete's suggestions are slow -- they take about 5 seconds to appear, even on small files. I'm on a 16G RAM MB Pro.

Really?
I cannot reproduce it.

Please upload the reproduce ways.

@Shougo
Copy link
Owner

Shougo commented Dec 13, 2017

Any ideas?

Please reproduce it for me.

We cannot fix the not reproduce-able problem.
We have not the magic power.

@jonahx
Copy link
Author

jonahx commented Dec 13, 2017

Re: the original problem, here is the relevant output from :messages:

[deoplete@yarp] /usr/local/lib/ruby/gems/2.4.0/gems/rcodetools-0.8.5.0/lib/rcodetools/completion.rb:166:in `runtime_data_with_class': -:2:in `<class:ShortenedUrl>': uninitialized
 constant ShortenedUrl::MongoMapper (NameError) (Rcodetools::ProcessParticularLine::NewCodeError)
[deoplete@yarp] ^Ifrom -:1:in `<main>'
[deoplete@yarp] ^Ifrom /usr/local/lib/ruby/gems/2.4.0/gems/rcodetools-0.8.5.0/lib/rcodetools/completion.rb:287:in `candidates_with_class'
[deoplete@yarp] ^Ifrom /usr/local/lib/ruby/gems/2.4.0/gems/rcodetools-0.8.5.0/lib/rcodetools/completion.rb:295:in `candidates'
[deoplete@yarp] ^Ifrom /usr/local/lib/ruby/gems/2.4.0/gems/rcodetools-0.8.5.0/lib/rcodetools/completion.rb:313:in `completion_code'
[deoplete@yarp] ^Ifrom /usr/local/lib/ruby/gems/2.4.0/gems/rcodetools-0.8.5.0/lib/rcodetools/completion.rb:206:in `run'
[deoplete@yarp] ^Ifrom /usr/local/lib/ruby/gems/2.4.0/gems/rcodetools-0.8.5.0/bin/rct-complete:45:in `<top (required)>'
[deoplete@yarp] ^Ifrom /usr/local/bin/rct-complete:23:in `load'
[deoplete@yarp] ^Ifrom /usr/local/bin/rct-complete:23:in `<main>'

Regarding the slow behavior, what should I do to reproduce it for you, besides the miminal .vimrc I posted? I can take a video, or capture any other info you need. I'm just not sure what that is.

Thanks,
Jonah

We have not the magic power.

Your plugins suggest otherwise :)

@Shougo
Copy link
Owner

Shougo commented Dec 13, 2017

It seems rcodetools error.
It is not both deoplete and deoplete-rct error.
I cannot fix it.

Regarding the slow behavior, what should I do to reproduce it for you, besides the miminal .vimrc I posted? I can take a video, or capture any other info you need. I'm just not sure what that is.

Please upload the Ruby code.

@jonahx
Copy link
Author

jonahx commented Dec 13, 2017

Re: the rct problem, you are right -- I will investigate that myself within the context of rct.

Re: the slowness, it happens with all files, not just ruby. So the simplest thing is to show you it happening in the minimal ".vimrc" itself that I posted earlier:

deoplete-video

NOTE: That video is in real time, and not slowed down.

If you need any additional debugging info, let me know. Also, since this is about deoplete itself at this point and not deoplete-rct, let me know if I should repost it as a deoplete issue and we can close this.

Thanks.

@Shougo
Copy link
Owner

Shougo commented Dec 14, 2017

@jonahx It is very slow.
It is not deoplete-rct problem.
Please create the another issue in deoplete.
And please enable profile and upload the log file.
I will check it.

       let g:deoplete#enable_profile = 1
       call deoplete#enable_logging('DEBUG', 'deoplete.log')

@Shougo Shougo closed this as completed Dec 14, 2017
@Shougo
Copy link
Owner

Shougo commented Dec 14, 2017

And the log file:

       $ export NVIM_PYTHON_LOG_FILE=/tmp/log
       $ export NVIM_PYTHON_LOG_LEVEL=DEBUG
       $ neovim
       ... Use deoplete
       $ cat /tmp/log_{PID}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants