tl;dr Jump to the bottom to see the demo.
"cquery is a highly-scalable, low-latency language server for C/C++/Objective-C". There are uses on indexing Chromium, LLVM projects, and Linux kernel. It provides similar features with venerable rtags, like finding definitions/references.
https://github.com/MaskRay/ccls libclang + Clang C++
https://github.com/cquery-project/cquery libclang
You can take this issue as a "seeking for help". There are many pieces need customizing (cquery.el lsp-mode lsp-ui) to provide a kinda satisfying code assistant UI. spacemacs is used by many and to me a suitable place to combine these efforts. I leave some notes at https://github.com/jacobdufault/cquery/wiki/Emacs but my elisp-fu is incapable to create a robust layer.
I'd also like to know if there is interest to incorporate lsp-mode through which we can provide a unified interface for C++, Rust and many other languages. I have used rls (Rust) and cquery (C++) and many features can and should be shared and be provided by a common library (lsp-mode lsp-ui). cquery.el provides a LSP plugin for cquery and it also has some extensions not included in LSP:
;; emacs-ccls https://melpa.org/#/ccls (ccls-xref-find-custom "$ccls/base") (ccls-xref-find-custom "$ccls/callers") ;; No "$ccls/derived", use lsp-goto-implementation from lsp-mode instead (ccls-xref-find-custom "$ccls/vars") ;; Alternatively, use lsp-ui-peek interface (lsp-ui-peek-find-custom 'base "$ccls/base") (lsp-ui-peek-find-custom 'callers "$ccls/callers") ;; ...... emacs-cquery https://melpa.org/#/cquery ;; the cquery counterparts are similar (cquery-xref-find-custom "$cquery/base") (cquery-xref-find-custom "$cquery/callers") (cquery-xref-find-custom "$cquery/derived") (cquery-xref-find-custom "$cquery/vars") ;; Alternatively, use lsp-ui-peek interface (lsp-ui-peek-find-custom 'base "$cquery/base") (lsp-ui-peek-find-custom 'callers "$cquery/callers") ;; ......
There are still useful features that are missing or can be improved in cquery.el. And it is also nice to learn from users using other code assistants to know what can be improved generally about cquery.
I might be biased regarding rtags because I am a contributor of cquery. What bothered me a lot when I was using rtags was its query performance Andersbakken/rtags#1007
See also:
cquery.el: https://github.com/cquery-project/emacs-cquery/blob/master/cquery.el
lsp-mode https://github.com/emacs-lsp/lsp-mode
lsp-ui https://github.com/emacs-lsp/lsp-ui
A brief list of what can be improved
$cquery/typeHierarchyTree
(setq cquery-extra-init-params '(:enableComments 2 :cacheFormat "msgpack")
, comments are not nicely rendered in eldoc [hover] Display the last MarkedString when there are multiple. emacs-lsp/lsp-mode#224workspace/executeCommand
jacobdufault/cquery#283If you speak Chinese, I've written an article introducing cquery and my configuration http://maskray.me/blog/2017-12-03-c++-language-server-cquery
ztlevi, robbert-vdh, dvzubarev, yixinglu, chm-von-tla and 28 moreJJPandari, jchmiela, Miloas, xykoflz, axelson and 2 more
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4