I have been using rtags as my primary C++ mode, but I found that it's performance is not satisfying for large code bases e.g. Linux kernel.

It takes more than 5 seconds to find definitions. This it not so bad, but I heard that cquery provides better performance.

So I installed cquery and set up my .el file:

(use-package lsp-mode)

(use-package lsp-ui :commands lsp-ui-mode)
(use-package company-lsp :commands company-lsp)

(use-package cquery
  (setq cquery-executable "/path/to/cquery"))

I followed the steps introduced in the documentation, namely:

  1. Prepare compile_commands.json (I used bear)
  2. Open file
  3. Run lsp by M-x lsp

At this point, I get error message, saying:

error in process filter: Symbol’s value as variable is void: method

and the status bar halts at LSP[cquery:18565 status:starting]

Am I missing any steps?

  • Try enabling traceback though M-x toggle-debug-on-error and post the results. The error message implies that you don't have variable named method. I think, it comes from eioei package, but I could be wrong. I'd need to see the actual source to be sure. – wvxvw Mar 10 '19 at 13:33

This is caused by a bug in dash 2.14.1, where the &hash statement in -let bindings is broken.

Update to dash 2.15.0 for a fix.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.