Editor Setup
clice implements the Language Server Protocol, so any editor with an LSP client can use it. The editors below fall into two groups: editors with an official clice plugin, and editors configured through their generic LSP client.
All setups assume:
- The
cliceexecutable is on yourPATH(or use an absolute path in the snippets below). - Your project provides a
compile_commands.json(by default clice searches the workspace root andbuild/).
Official Plugins
Visual Studio Code
Install the clice extension from the marketplace. The extension downloads a clice binary automatically; set clice.executable to use your own build.
Neovim
clice ships an LSP config for Neovim ≥ 0.11 in editors/nvim. Copy doc/clice.lua into your config's lsp/ directory, then enable it:
vim.lsp.enable('clice')Zed
The Zed extension lives in editors/zed.
Generic LSP Clients
Helix
Add to ~/.config/helix/languages.toml:
[language-server.clice]
command = "clice"
args = ["server"]
[[language]]
name = "cpp"
language-servers = ["clice"]
[[language]]
name = "c"
language-servers = ["clice"]Emacs
With the built-in eglot:
(with-eval-after-load 'eglot
(add-to-list 'eglot-server-programs
'((c-mode c-ts-mode c++-mode c++-ts-mode)
. ("clice" "server"))))Sublime Text
Install the LSP package, then add to its settings:
{
"clients": {
"clice": {
"enabled": true,
"command": ["clice", "server"],
"selector": "source.c | source.c++"
}
}
}Kate
Open Settings → Configure Kate → LSP Client → User Server Settings and add:
{
"servers": {
"c": {
"command": ["clice", "server"],
"url": "https://github.com/clice-io/clice",
"highlightingModeRegex": "^(C|C\\+\\+)$"
}
}
}Vim
With vim-lsp:
if executable('clice')
au User lsp_setup call lsp#register_server({
\ 'name': 'clice',
\ 'cmd': {server_info->['clice', 'server']},
\ 'allowlist': ['c', 'cpp'],
\ })
endif