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

cquery.elc failed to define function lsp-cquery-enable #58

Open
jeffpollock9 opened this issue Dec 5, 2018 · 5 comments
Open

cquery.elc failed to define function lsp-cquery-enable #58

jeffpollock9 opened this issue Dec 5, 2018 · 5 comments

Comments

@jeffpollock9
Copy link

After doing a package update lsp-cquery-enable doesn't seem to work for me, on startup I get this in my messages:

File mode specification error: (error Autoloading file /home/jeff/.emacs.d/elpa/cquery-20181203.1829/cquery.elc failed to define function lsp-cquery-enable)

My emacs skills are somewhat lacking so please forgive me if I have done something stupid here. Relevant part of my .emacs.d/init.el (which I mostly took from the wiki):

  (use-package cquery
    :ensure t
    :bind
    (:map c++-mode-map
          ("C-b" . clang-format-buffer)
          ("C-d" . duplicate-thing))
    :commands lsp-cquery-enable
    :init
    (defun cquery//enable ()
      (condition-case nil (lsp-cquery-enable) (user-error nil)))
    (add-hook 'c-mode-hook #'cquery//enable)
    (add-hook 'c++-mode-hook #'cquery//enable))

and the full config is here

Any help is much appreciated and please let me know if there is anything I can do to help.

@brucestephens
Copy link
Contributor

The function to call is now just lsp, I think. (But there are other things that are slightly different/broken, so you might try using a slightly older version if you can until it's all resolved.)

@jeffpollock9
Copy link
Author

@brucestephens thanks for the prompt reply! I have things mostly working by replacing lsp-cquery-enable with lsp.

Please feel free to close this issue now - or keep it open until the documentation/whatever is updated - whatever suits you.

@verminniu
Copy link

I called lsp but still not work....

@andrelkin
Copy link

@verminniu Make sure you have updated lsp package. I only needed

(require 'cquery)

and then M-x lsp to make it work again (after the former method unimpressively deceased).

@jeffpollock9
Copy link
Author

@verminniu I have actually moved to ccls which has all of this documented, as far as I can tell it works pretty much the same as cquery

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

4 participants