clice README

项目的 README,来自 github.com/clice-io/clice。合并为一个 markdown 文件:README.md。

clice

clice

C++ Standard GitHub license CI Documentation Discord

A C/C++ language server written in modern C++, and more than a language server. Like clangd and ccls it is built on LLVM/Clang, but it is redesigned from the ground up to solve the problems their architecture has left unsolved for years. See What is clice?

The story behind clice and how it was built: clice v1.0 Released: Welcome to Modern C++.

Language Server

Command Line

The same engine answers from the command line:

Built with Modern C++

Getting Started

Install

Download the latest binary from the releases page, or build from source.

Platforms: Linux (x64, ARM64), macOS (x64, ARM64), Windows (x64, ARM64)

Release channels:

Channel Version Where to get it
Stable even minor, e.g. v1.0.0 releases page + VS Code Marketplace + Open VSX
Nightly odd minor, e.g. v1.1.2026112002 GitHub pre-releases + Marketplace and Open VSX pre-release channel (Switch to Pre-Release Version on the extension page)
Per-commit untagged artifacts on the latest green main CI runs

The versioning rule is the VS Code Marketplace convention: even minor = stable, odd minor = pre-release. Nightly patch numbers encode the UTC build time as YYYYMMDDHH (year, month, day, hour — e.g. 2026071902 is 2026-07-19 02:00 UTC), so newer is always higher; a nightly is published only when main gained commits, and only the newest 25 nightlies, none older than 30 days, are kept, besides the one Neovim's Mason registry installs. Every published binary is the exact one that passed the full test suites — releases promote CI builds rather than rebuilding.

For the freshest bits, every green main CI run attaches installable artifacts (binaries and platform vsix) to its run page, so a fix can be tried the moment it merges (GitHub login required for artifact downloads).

Each release also ships *.symbols packages: if clice crashes, attach the newest server log to an issue and the matching symbols let us reconstruct the exact stack. The log location is printed at startup in your editor's clice output panel (Session log directory: — by default under <workspace>/.clice/logs/).

Editor Setup

Editor Setup
VS Code Install the clice extension from the Marketplace
Cursor, VSCodium, Windsurf Install the clice extension from Open VSX
Neovim With nvim-lspconfig on Neovim 0.11 or later: vim.lsp.enable('clice')
Zed Load editors/zed as a local extension
Other Any LSP client works — point it at clice serve

Project Setup

clice reads a compilation database to understand your project. For CMake:

cmake -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON

By default clice loads every compile_commands.json in the project root and its immediate subdirectories (e.g. build/). See project setup for other build systems, and the configuration guide for databases elsewhere and files without one.

[!NOTE] clice 1.0 is its first stable release. Bug reports via issues are welcome.

Documentation

Full docs at docs.clice.io/clice: the guide and configuration, every language feature and command, and the design.

Contributing

See building from source or join our Discord.

bazel build //:dist   # clice and the unit tests
pixi run test         # the unit tests and the cases

clice (clice-io/clice)

正在搜索数据库…

1.8K ·GitHub
这是什么?clice 是一个面向 C、C++、Objective-C 和 CUDA 的语言服务器,基于 Clang 和 LLVM 构建。它使用现代 C++ 编写,同时还提供一个使用同一引擎的命令行工具。
它是编辑器插件还是命令行工具?两者都是。编辑器通过语言服务器的方式连接它,同一引擎也可以从命令行运行,用于对整个项目进行索引、查询、代码检查、格式化和重构。
我该怎么把它跑起来?可以从发布页面下载二进制文件,也可以从 VS Code 应用市场或 Open VSX 安装 clice 扩展。在 Neovim 0.11+ 中配合 nvim-lspconfig 使用时,调用 vim.lsp.enable('clice')。其他 LSP 客户端可以指向 'clice serve'。
它需要项目里有什么特别的东西吗?通常只需要一个 compilecommands.json。默认情况下,它会加载项目根目录及其直接子目录(例如 build/)中的所有 compilecommands.json 文件。
它现在稳定了吗?是的,1.0 是第一个稳定版本。v1.0.0 这样的偶数次版本是稳定版,而 v1.1.x 这样的奇数次版本是 nightly 预发布版。Bug 报告通过 GitHub Issues 提交。
它支持哪些操作系统和芯片?支持 Linux、macOS 和 Windows,且每个系统都同时支持 x64 和 ARM64 架构。
它和 clangd、ccls 有什么不同?它从头重新设计,以隔离崩溃。编译任务在一个工作进程池中运行,因此一次崩溃只会损失一个工作进程,而不是整个服务器。它还增加了 C++20 具名模块支持,以及针对头文件的编译上下文。
它支持 C++20 模块吗?支持。它支持从 compilecommands.json 读取完整的 C++20 具名模块,扫描依赖关系并按需构建所需模块,还能在不同会话之间复用 PCH 和 PCM 缓存。
除了为编辑器提供服务,CLI 还能做什么?clice index 可预先构建项目索引,query 以 JSON 格式返回定义、引用和调用图,refactor 可在整个项目中重命名符号。analyze 和 modularize 则用于帮助把代码迁移到 C++20 模块中。
作者为什么要做这个项目?作者表示,clangd 和 ccls 多年来都没有解决架构上的问题,因此 clice 基于 LLVM 和 Clang 从零重建,以解决这些问题。
作者
clice-io
大小
25.8 MB
星标
1.8K
时长
2年
提交 · 90 天