       lsp-before-save-edits nil
       lsp-enable-eldoc nil)
 
-(defun ccls//enable ()
-  (condition-case nil
-      (lsp-ccls-enable)
-    (user-error nil)))
-
-(add-hook 'c-mode--hook #'ccls//enable)
-(add-hook 'c++-mode-hook #'ccls//enable)
-(add-hook 'objc-mode-hook #'ccls//enable)
+(add-hook 'c-mode--hook #'lsp-cquery-enable)
+(add-hook 'c++-mode-hook #'lsp-cquery-enable)
 
 ;; broken:
 ;; (require 'lsp-imenu)

                     gnus-summary-ext
                     smartparens
                     elm-mode
                     ccls
                     yafolding
                     ))


(add-to-list 'cff-source-regexps '("\\.m$" . (lambda (base) (concat base ".m"))))
(add-to-list 'cff-source-regexps '("\\.mm$" . (lambda (base) (concat base ".mm"))))

(require 'cquery)
(setq cquery-executable (expand-file-name "~/cquery/cquery"))
(setq cquery-extra-init-params '(:index (:comments 2) :cacheFormat "msgpack"))
(setq cquery-sem-highlight-method nil
      cquery-enable-inactive-region nil)

(require 'lsp-mode)
(setq lsp-highlight-symbol-at-point nil
      lsp-enable-indentation nil
      lsp-enable-codeaction nil
