[package]
name = "beancount-language-server"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
authors = ["Brian Ryall <polarmutex@users.noreply.github.com>"]
license = "MIT"
readme = "../../README.md"
repository = "https://github.com/polarmutex/beancount-language-server"
homepage = "https://github.com/polarmutex/beancount-language-server"
documentation = "https://docs.rs/beancount-language-server"
keywords = ["beancount", "lsp", "language-server", "accounting", "finance"]
categories = ["development-tools", "text-editors"]
description = "A Language Server Protocol implementation for Beancount, providing rich editing features like completions, diagnostics, and formatting"

[dependencies]
# Core functionality
anyhow.workspace = true
thiserror.workspace = true
tracing.workspace = true

# LSP and server functionality
lsp-server.workspace = true
lsp-types.workspace = true
crossbeam-channel.workspace = true
threadpool = "1.8"

# Text processing and parsing
ropey.workspace = true
tree-sitter-beancount = "2.4.2"
# tree-sitter-beancount = { git = "https://github.com/polarmutex/tree-sitter-beancount.git", branch = "devel" }
regex.workspace = true
nucleo = "0.5"
strum = "0.27.2"
strum_macros = "0.27.2"

# Serialization and configuration
serde.workspace = true
serde_json.workspace = true
serde_with = "3.11"

# Utilities
chrono = { version = "0.4", default-features = false, features = ["clock"] }
clap = { version = "4.5", features = ["derive"] }
itertools = "0.14"
shellexpand = "3.1"
glob = "0.3"
url = "2.5"
which = "6.0"

# Data structures
dashmap = "6.1"
bytes = "1.11"
linked-list = "0.1"
rust_decimal = "1.37"

# Python integration (optional)
pyo3 = { version = "0.27", features = [
    "abi3-py38",
    "auto-initialize",
    "generate-import-lib"
], optional = true }

# Logging
tracing-subscriber = { version = "0.3", default-features = false, features = [
    "env-filter",
    "fmt",
    "smallvec",
    "std",
    "tracing-log",
] }

[dev-dependencies]
# Testing utilities
env_logger = "0.11"
insta.workspace = true
test-log = { version = "0.2", features = ["trace"] }
tempfile = "3.0"

# Benchmarking
criterion = "0.5"

[[bench]]
name = "beancount_data"
harness = false

[[bench]]
name = "completion_performance"
harness = false

[[bench]]
name = "didchange_performance"
harness = false

[[bench]]
name = "checker_performance"
harness = false

[package.metadata.dist]
dist = true

[package.metadata.release]
tag = true

[features]
default = []
python-embedded = ["pyo3"]
integration-tests = []
