[已解决] Company-c-headers 无法自动补全头文件

配置如下,无法自动补全头文件。

(after-load 'company
  (add-hook 'c-mode-common-hook
            (lambda () (sanityinc/local-push-company-backend #'company-c-headers))))

(setq company-c-headers-path-system '"/usr/include/c++/4.8.2")

;; (defun ede-object-system-include-path ()
;;   "Return the system include path for the current buffer."
;;   (when ede-object
;;     (ede-system-include-path ede-object)))

;; (setq company-c-headers-path-system 'ede-object-system-include-path)

Message是: Company: An error occurred in auto-begin Company: backend company-c-headers error "Wrong type argument: listp, “/usr/include/c++/4.8.2"” with args (candidates <ios)

找到问题了。 不会关闭主题,望大家看到不要再浪费时间啦~

请问您是如何解决的么

(require 'company-c-headers)

(with-eval-after-load 'company
  (add-hook 'c-mode-common-hook
            (lambda () (sanityinc/local-push-company-backend #'company-c-headers))))

(add-to-list 'company-c-headers-path-system '"/${c-header-path}")

加了个路径配置