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

Is it possible to use cquery instead of ycmd #5

Closed
pdavydov108 opened this issue Feb 8, 2018 · 4 comments
Closed

Is it possible to use cquery instead of ycmd #5

pdavydov108 opened this issue Feb 8, 2018 · 4 comments

Comments

@pdavydov108
Copy link

Hello @davits ! Do you have plans to support language server protocol in your plugin? As far as I know, cquery language server is quite mature already, and it can work as a data provider for c/c++ semantic completion. As I read in the readme, now you maintain your own forks of ycmd and ycm. Maybe it is easier to just switch backend to cquery?

@davits
Copy link
Owner

davits commented Feb 11, 2018

Hi @pdavydov108. I don't have such plans for the foreseeable future.
My reasons:

  1. LSP does not have support for the semantic highlighting yet and cquery uses it's own implementation for that, so you have to find compatible client or do some client work in DyeVim.
  2. I am not sure whether cquery's semantic info could be easily converted into compatible format which DyeVim can process. See Change character units from UTF-16 code unit to Unicode codepoint microsoft/language-server-protocol#376 .
  3. While I admire cquery I don't believe it is a viable option for the corporate environments, i.e. multiple users working on the same server on a pretty big codebase. People tend to work on a several partial builds and open a lot of instances of Vim. In our company we are using YCM which in comparison has a very modest appetite for RAM, and after a week of trial we were forced to write a script which checks RAM usage by YCM plugins and turns it off at after a certain limit.

A good solution for me would be a ycmd like server for local files/projects talking to a global/nightly server (like Google Kythe, rtags). I am working in that direction now.

@pdavydov108
Copy link
Author

Thanks for the explanation @davits. This sounds reasonable to me. I'm curious (though it is out of scope of this question) - if you use ycmd, how do you get some features that require full code indexing, for example references and usages of some variable/class/function?
Your idea with local and remote server sounds cool. Have you blogged about it? Do you need help with it?

@davits
Copy link
Owner

davits commented Feb 15, 2018

I use silver searcher for a specific names and switch to the rtags for a generic names. Others usually struggle with grep.
I've been nourishing this idea for quite a while now, and started experimenting/writing a LSP server lately. I'll publish it once it reaches maturity, and I will definitely need help with it.

@pdavydov108
Copy link
Author

Thanks for sharing your plans and experience! This sounds promising. I'm interested in getting a solid setup for c++ programming in vim. For now it feels like my cpu is doing a lot of duplicate work all the time - ycm, cquery or rtags, clang or gcc are all recompiling my code all the time. It would be nice to unify at least first two of them. However all options that we have now have their drawbacks, so if you have a good idea about this stuff, I'm ready to help. Feel free to ping me as soon as you'll need it.

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