# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

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

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

[lib]
name = "tui_syntax_highlight"
path = "src/lib.rs"

[[example]]
name = "background_color"
path = "examples/background_color.rs"
doc-scrape-examples = true

[[example]]
name = "detect_color_support"
path = "examples/detect_color_support.rs"
doc-scrape-examples = true
required-features = ["termprofile"]

[[example]]
name = "highlight_file"
path = "examples/highlight_file.rs"
doc-scrape-examples = true

[[test]]
name = "highlight_test"
path = "tests/highlight_test.rs"

[dependencies.ratatui]
version = "0.29"
default-features = false

[dependencies.syntect]
version = "5"
features = ["parsing"]
default-features = false

[dependencies.termprofile]
version = "0.1"
features = [
    "convert",
    "ratatui",
]
optional = true

[dev-dependencies.insta]
version = "1.43"

[dev-dependencies.ratatui]
version = "0.29"

[dev-dependencies.syntect]
version = "5"
features = [
    "default-syntaxes",
    "default-themes",
]
default-features = false

[dev-dependencies.syntect-assets]
version = "0.23"

[dev-dependencies.termprofile]
version = "0.1"
features = [
    "convert",
    "ratatui",
    "terminfo",
    "query-detect",
]

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

[lints.rustdoc]
broken_intra_doc_links = "deny"
