git clone -b develop https://github.com/hlissner/.emacs.d ~/.emacs.d
git clone https://github.com/xhcoding/doom-private.git ~/.config/doom
cd ~/.emacs.d
make all
补全需要的服务端,ccls安装方法
- 第一步:安装VS2017及以上版本,安装时勾选上CMake
- 第二步:编译 clang及lldb(为了使用lldb-vscode 调试)
打开 适用于VS2017的x64本机工具命令提示
这个cmd
// 下载源码
git clone https://mirrors.tuna.tsinghua.edu.cn/git/llvm/llvm.git
git clone https://mirrors.tuna.tsinghua.edu.cn/git/llvm/clang.git llvm/tools/clang
git clone https://mirrors.tuna.tsinghua.edu.cn/git/llvm/lldb.git llvm/tools/lldb
// 进入目录
cd llvm
// 编译
cmake -H. -BRelease -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DLLVM_TARGETS_TO_BUILD=X86
ninja -C Release clangFormat clangFrontendTool clangIndex clangTooling clang lldb
- 第三步:编译 ccls
// 下载代码
git clone --recursive https://github.com/MaskRay/ccls
// 生成
cmake -H. -BRelease -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=clang-cl -DSYSTEM_CLANG=On -DCMAKE_PREFIX_PATH="D:/Code/CCPro/llvm/Release;D:/Code/CCPro/llvm/Release/tools/clang;D:/Code/CCPro/llvm;D:/Code/CCPro/llvm/tools/clang"
// 构建
ninja -C Release
CMAKE_PREFIX_PATH 为你的llvm的目录。
最后把 ccls和lldb-vscode 放到 $PATH 里
打开一个CMake 项目后先运行 M-x cp-project-refresh
- 新建项目:M-x cp-project-new
- 生成CMake 配置文件:M-x cp-project-gen
- 构建项目:cp-project-build
- 运行项目:cp-project-run