cpp_ls 0.3.0

A C, C++ and CUDA language server.
Documentation
[package]
name = "cpp_ls"
version = "0.3.0"
edition = "2024"
description = "A C, C++ and CUDA language server."
license = "MIT"
authors = ["CppCXY"]
repository = "https://github.com/CppCXY/cpp_ls"
keywords = ["cpp", "language-server"]
categories = ["development-tools"]

[dependencies]
# The engine: the parser and the analysis layer are the two crates this server exists to serve.
cpp_parser.workspace = true
# The formatter: `textDocument/formatting` is this server handing the file to `cpp_formatter` and diffing the result.
cpp_formatter.workspace = true
cpp_code_analysis.workspace = true

# The protocol. `lsp-server` is the transport-and-framing half (stdio/TCP, JSON-RPC, the initialize
# handshake); `lsp_types` is the emmy fork of the generated types, which is what the inherited handlers
# are written against.
lsp-server.workspace = true
lsp_types.workspace = true
serde.workspace = true
serde_json.workspace = true

# The runtime. `tokio` because every handler is async, the update queue is a task and the indexing pump is another;
# `tokio-util` for the `CancellationToken` every request carries.
tokio.workspace = true
tokio-util.workspace = true

# The two vocabularies a reader hovers over -- C++'s keywords and Doxygen's commands -- are text, not logic: they
# live in `locales/en.yml` and are embedded at build time by `rust_i18n::i18n!`. The same crate carries the
# parser's own messages, so a translation is a second YAML file and not a second code path.
rust-i18n.workspace = true

# A `file:` URI is percent-encoded, and a Windows path is not.
percent-encoding.workspace = true
# Native watching is used when the client cannot register watched-file notifications.
notify.workspace = true

# Logging: `log` for the calls, `fern` for the sink, `chrono` for the timestamp in the file name.
log.workspace = true
fern.workspace = true
chrono.workspace = true

clap = { workspace = true, optional = true }
mimalloc = { version = "0.1", optional = true, default-features = false }

[[bin]]
name = "cpp_ls"
required-features = ["cli"]

[features]
default = ["cli"]
cli = ["dep:clap", "dep:mimalloc"]