 (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)
-;; https://github.com/cquery-project/cquery/wiki/Getting-started
-(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)
+(require 'ccls)
+(setq ccls-executable (expand-file-name "~/ccls/Release/ccls"))
+(setq ccls-extra-init-params '(:index (:comments 2) :completion (:detailedLabel t) :cacheFormat "msgpack"))
+(setq ccls-sem-highlight-method nil)
+
+;; (require 'lsp-clangd)
 (setq lsp-highlight-symbol-at-point nil
       lsp-enable-indentation nil
       lsp-enable-codeaction nil

      lsp-before-save-edits nil
      lsp-enable-eldoc nil)

(add-hook 'c-mode-hook #'lsp-cquery-enable)
(add-hook 'c++-mode-hook #'lsp-cquery-enable)

;; broken:
;; (require 'lsp-imenu)

(add-to-list 'projectile-globally-ignored-files ".DS_Store")
(add-to-list 'projectile-globally-ignored-directories ".build")
(add-to-list 'projectile-globally-ignored-directories "build")
(add-to-list 'projectile-globally-ignored-directories ".ccls-cache")

(bind-key "M-g" '(lambda ()
                   (interactive)
