用的spacemacs的默认配置
试试这样行不行,抄来的:
(with-eval-after-load 'ccls
(when (eq system-type 'darwin)
(setq ccls-initialization-options
`(:clang ,(list :extraArgs ["-isystem/Library/Developer/CommandLineTools/usr/include/c++/v1"
"-isystem/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include"
"-isystem/usr/local/include"]
:resourceDir (string-trim (shell-command-to-string "clang -print-resource-dir")))))))
1 个赞
用clangd就没有问题,有ccls就显示有很多错误