首页 > 解决方案 > 如何在 Mac 上安装 clangd?

问题描述

我正在尝试clangd根据c-cpp页面使用 Spacemacs。我已经尝试下载 LLVM 的 macOS 二进制文件,并且我遵循了这个这个,但是当我运行时which clangd,它说找不到它。我也跑了brew install llvm,但这也没有表明那clangd在我的路上。我确实有一个二进制文件/usr/local/Cellar/llvm/9.0.0_1/bin,但是当我重新启动 Emacs 并打开 C++ 源文件时,我的 LSP 没有做任何事情。我/usr/local/bin在我的路上。

标签: macosemacsclangspacemacsemacs-lsp

解决方案


I added /usr/local/opt/llvm/bin/ to my PATH and that worked. Thanks to Mikael Springer. I wonder why it wasn't working with the other location (and why I have multiple copies of llvm binaries).


推荐阅读