cquery-project / emacs-cquery

Emacs client for cquery, a low-latency language server supporting multi-million line C++ code-bases
116 stars 14 forks source link

Semantic highlighting errors #5

Closed rietmann closed 6 years ago

rietmann commented 6 years ago

Trying the melpa version (20180121.2203), I get the following errors:

error in process filter: cquery--publish-semantic-highlighting: Symbol’s function definition is void: face
error in process filter: Symbol’s function definition is void: face

I'm using spacemacs, trying the lsp layer in this pull request, and a cquery layer that looks like:

(defconst cquery-packages
  '(
    ;; lsp-mode ;; lsp required via (configuration-layer/declare-layer 'lsp)
    company-lsp
    cquery
    ))

;; (defun cquery/init-lsp-mode ()
;;   (use-package lsp-mode))

(defun cquery/post-init-company-lsp ()
  (message "trying adding company-lsp to c-mode-common backends")
  (push 'company-lsp company-backends-c-mode-common)
  )

(defun cquery/init-cquery ()
  (use-package cquery
    :init
    (progn
      (spacemacs/add-to-hooks #'lsp-cquery-enable '(c-mode-hook c++-mode-hook))
      )))

And a few tweaks in user-config

(setq cquery-additional-arguments (list "--log-file" "cquery.log"))
  (setq cquery-executable "/home/rietmann/.local/stow/cquery/bin/cquery")
  ;; (setq lsp-highlight-symbol-at-point nil)
  ;; (face-spec-set 'lsp-face-highlight-textual '((t :background nil :inherit hl-line)))
  (setq lsp-ui-sideline-show-hover nil)

I'm not too good at debugging elisp, but I thought you should know I'm having trouble and my config.

MaskRay commented 6 years ago

Welcome to be an early Melpa version user and lsp layer user!

Can you set debug-on-error to t and dump the stack trace?

I don't know if the use of

(defcustom cquery-sem-type-faces [cquery-sem-type-face]
  "Faces used to mark types."
  :type '(repeat face)
  :group 'cquery)

is correct. But your config looks innocent to me and I run a similar config with no trouble running cquery.el with or without (cquery-use-default-rainbow-sem-highlight)

rietmann commented 6 years ago

For my setup, I report this as fixed with cquery version 20180122.1922.

Not sure what changed, but thanks!

Max