[package]
name = "tui-syntax-highlight"
description = "A syntax highlighter for Ratatui apps"
version = "0.1.0"
edition = "2024"
rust-version = "1.88.0"
authors = ["Austin Schey <aschey13@gmail.com>"]
license = "MIT OR Apache-2.0"
readme = "README.md"
include = ["/src", "/examples", "/tests", "LICENSE-MIT", "LICENSE-APACHE"]
repository = "https://github.com/aschey/tui-syntax-highlight"
homepage = "https://github.com/aschey/tui-syntax-highlight"
keywords = ["tui", "terminal"]
categories = ["command-line-interface"]

[workspace]
resolver = "3"
members = ["./examples/sqlite_custom"]

[dependencies]
ratatui = { version = "0.29", default-features = false }
syntect = { version = "5", default-features = false, features = ["parsing"] }
termprofile = { version = "0.1", features = [
  "convert",
  "ratatui",
], optional = true }

[features]
regex-fancy = ["syntect/regex-fancy"]
regex-onig = ["syntect/regex-onig"]
termprofile = ["dep:termprofile"]
default = ["regex-onig"]

[dev-dependencies]
insta = "1.43"
ratatui = { version = "0.29" }
syntect = { version = "5", default-features = false, features = [
  "default-syntaxes",
  "default-themes",
] }
syntect-assets = "0.23"
termprofile = { version = "0.1", features = [
  "convert",
  "ratatui",
  "terminfo",
  "query-detect",
] }

[lints.rustdoc]
broken_intra_doc_links = "deny"

[lints.clippy]
allow_attributes = "deny"
doc_markdown = "warn"
default_trait_access = "warn"
ignored_unit_patterns = "warn"
semicolon_if_nothing_returned = "warn"
missing_fields_in_debug = "warn"
use_self = "warn"
impl_trait_in_params = "warn"
missing_panics_doc = "warn"
explicit_iter_loop = "warn"
explicit_into_iter_loop = "warn"
redundant_closure_for_method_calls = "warn"

[[example]]
name = "background_color"
doc-scrape-examples = true

[[example]]
name = "detect_color_support"
required-features = ["termprofile"]
doc-scrape-examples = true

[[example]]
name = "highlight_file"
doc-scrape-examples = true
