Let me know if you have any questions.
Cquery: highly-scalable, low-latency language server for C++
21–30 of 74 posts
Re: Cquery: highly-scalable, low-latency language server for C++
#22Is this like https://github.com/Andersbakken/rtags but for vscode? Any key differences?
- cquery interacts with an editor via the language server protocol, letting it work with any editor with relatively minimal work - cquery handles larger repositories better (ie, indexing all of Chrome takes 20-30 minutes on a high-end workstation) - cquery responds to semantic requests within 10ms or so
There are some other differences but those are related to the features implemented, ie, cquery supports code lens.
I'm not sure how code completion is in rtags, but I've spent a fair amount of time making it work as fast as possible in cquery. There is quite a bit of caching built on-top of the clang API which often makes it feel instantaneous.
Re: Cquery: highly-scalable, low-latency language server for C++
#23Is this like https://github.com/Andersbakken/rtags but for vscode? Any key differences?
For one thing, it sounds like it implements the Language Server protocol, which will make it usable for other IDEs and text editors with support for this protocol (a quickly growing list.) Not aware of Rtags but I'll assume it's similar to the omnipresent C tags but with an actual C++ parser. If that's the case, in theory cquery is a lot more powerful; it would include the symbol indexing of Rtags but also code refac…
This can be done similar to what rtags does (hooking into gcc/clang invocations). Alternatively if you use ninja this relatively simple by generating a compile_commands.json file.
ninja -C out/Release -t compdb cxx cc > compile_commands.json
My eventual plan is to automate compile_commands.json generation if using ninja, so cquery is install and go.Re: Cquery: highly-scalable, low-latency language server for C++
#24Wow! I consider myself lucky that I practically do not have to deal with C++, but if I were a C++ kind of person, right now I would deeply appreciate how much hard work goes into a tool like this. [1] In order to be any good, it has to be even more clever than the compiler, at least in a few ways. And I have a hunch that in the field of programming languages that are used these days, C++ is probably not the easiest o…
Note that this server is based on libclang. This is good because having a good language support means that you have to practically write a compiler for it, using an actual compiler is the best way.
However, it is true that I have always used a full fledged IDE – mostly Qt Creator. I never had courage to configure Vim for it and now I will not invest in that. But if a good and fast language server for it existed a few years back I would definitely jump on it.
Re: Cquery: highly-scalable, low-latency language server for C++
#25FYI, I 150% disagree with his useless rants.
Re: Cquery: highly-scalable, low-latency language server for C++
#26Wow! I've just tested this and it's awesome. Much better than the C/C++ extension, since it's more robust (no false-positives for go-to-definition), faster and has more features (e.g. refactoring, better auto-complete, ...). It basically turns VS Code into the best C++ IDE possible for me.
It's not really linked to VSCode, is it ? i was under the impression that by example Sublime integration for LSP was possible.
Re: Cquery: highly-scalable, low-latency language server for C++
#27Run away from Jonathan Blow, as of today he was full rant mode on language server and similar stuff including on people that think this is a acceptable stuff, notably Hacker News audience. FYI, I 150% disagree with his useless rants.
Re: Cquery: highly-scalable, low-latency language server for C++
#28Run away from Jonathan Blow, as of today he was full rant mode on language server and similar stuff including on people that think this is a acceptable stuff, notably Hacker News audience. FYI, I 150% disagree with his useless rants.
I saw that on Twitter but I couldn't figure out what his actual complaint was. I think I'd probably disagree but I'm still interested in knowing.
Re: Cquery: highly-scalable, low-latency language server for C++
#29Re: Cquery: highly-scalable, low-latency language server for C++
#30Earlier quoted context omitted.
I saw that on Twitter but I couldn't figure out what his actual complaint was. I think I'd probably disagree but I'm still interested in knowing.
That doing all of this stuff via rpcs vs function calls is crazy I believe.