lyuts / vim-rtags

Vim bindings for rtags, llvm/clang based c++ code indexer.
BSD 2-Clause "Simplified" License
282 stars 56 forks source link

Symbol info not showing up in neovim #55

Closed jmdaly closed 7 years ago

jmdaly commented 7 years ago

Hi there,

First of all, thanks for a great plugin! This is definitely a main plugin for me when I'm doing C++ development. I noticed recently that, when working in neovim, calling ri on a symbol to get symbol info doesn't seem to work anymore. All that shows up in the status window is the range. e.g.,

Range: 42:9-42:20

By contrast, doing the same thing in vim shows the full symbol information as expected. I'm running neovim 0.2.

I did a git bisect on the vim-rtags repo and found that commit 646c2810481d1969a4f30ed73c410f78840dc5af is the one that introduced the regression. My knowledge of vimscript is pretty limited, so I wasn't able to debug the issue.

Hope that helps. The symbol info feature is really useful for me, and I work mostly in neovim, so if it's possible to fix, that would be great :)

jmdaly commented 7 years ago

I looked into it a little more. It looks like when the echo is being performed to echo all of the symbol info, in neovim it only displays the last line of output, which is the range. I'm not sure why this is, but I've attached a patch that seems to fix the issue. With the patch applied, on my system the symbol info now displays correctly in both vim and neovim.

With my limited vimscript knowledge, I'm not sure if this is the correct approach or not, but I wanted to present it as a possible solution.

fix_neovim_symbol_info.patch.txt

lyuts commented 7 years ago

Thank you very much for chasing that down. I need to start looking into neovim to get more experience with it, which hopefully helps avoid such bugs in future. Thank you.

jmdaly commented 7 years ago

You're welcome! Glad to be able to help out :)