.cargo/
crates/
brain/
diff/
files/
highlight/
benches/
src/
grammar/
blob.rs
14.3 KiB
error.rs
1.3 KiB
grammar.rs
10.3 KiB
json.rs
5.4 KiB
lib.rs
1.4 KiB
raw.rs
7.0 KiB
registry.rs
3.0 KiB
syntaxes.rs
2.2 KiB
tests.rs
33.4 KiB
theme.rs
18.7 KiB
util.rs
1.8 KiB
syntaxes/
tests/
Cargo.toml
492 B
repo/
signals/
tui/
tui-core/
tui-termion/
tui-widgets/
scripts/
src/
.gitignore
30 B
.gitsigners
198 B
AGENTS.md
1.9 KiB
CONTRIBUTING
1.7 KiB
Cargo.lock
5.4 KiB
Cargo.toml
1.9 KiB
LICENSE
1.1 KiB
README.md
245 B
STYLE
3.7 KiB
clippy.toml
213 B
crates/highlight/src/syntaxes.rs
raw
| 1 | //! Built-in TextMate grammar sources. |
| 2 | //! |
| 3 | //! Available with the `syntaxes` feature. Each constant holds the raw grammar |
| 4 | //! JSON for one language, ready to compile with `Grammar::from_str` or parse |
| 5 | //! into a `RawGrammar`. |
| 6 | |
| 7 | /// C grammar source. |
| 8 | pub const C: &str = include_str!("../syntaxes/c.json"); |
| 9 | |
| 10 | /// CSS grammar source. |
| 11 | pub const CSS: &str = include_str!("../syntaxes/css.json"); |
| 12 | |
| 13 | /// ERB grammar source. |
| 14 | pub const ERB: &str = include_str!("../syntaxes/erb.json"); |
| 15 | |
| 16 | /// Go grammar source. |
| 17 | pub const GO: &str = include_str!("../syntaxes/go.json"); |
| 18 | |
| 19 | /// HTML grammar source. |
| 20 | pub const HTML: &str = include_str!("../syntaxes/html.json"); |
| 21 | |
| 22 | /// JavaScript grammar source. |
| 23 | pub const JAVASCRIPT: &str = include_str!("../syntaxes/javascript.json"); |
| 24 | |
| 25 | /// Fish grammar source. |
| 26 | pub const FISH: &str = include_str!("../syntaxes/fish.json"); |
| 27 | |
| 28 | /// Lua grammar source. |
| 29 | pub const LUA: &str = include_str!("../syntaxes/lua.json"); |
| 30 | |
| 31 | /// Makefile grammar source. |
| 32 | pub const MAKE: &str = include_str!("../syntaxes/make.json"); |
| 33 | |
| 34 | /// Markdown grammar source. |
| 35 | pub const MARKDOWN: &str = include_str!("../syntaxes/markdown.json"); |
| 36 | |
| 37 | /// Python grammar source. |
| 38 | pub const PYTHON: &str = include_str!("../syntaxes/python.json"); |
| 39 | |
| 40 | /// Ruby grammar source. |
| 41 | pub const RUBY: &str = include_str!("../syntaxes/ruby.json"); |
| 42 | /// Radiance grammar source. |
| 43 | pub const RADIANCE: &str = include_str!("../syntaxes/radiance.json"); |
| 44 | |
| 45 | /// Radiance IL grammar source. |
| 46 | pub const RIL: &str = include_str!("../syntaxes/ril.json"); |
| 47 | |
| 48 | /// Rust grammar source. |
| 49 | pub const RUST: &str = include_str!("../syntaxes/rust.json"); |
| 50 | |
| 51 | /// Shell grammar source. |
| 52 | pub const SHELL: &str = include_str!("../syntaxes/shellscript.json"); |
| 53 | |
| 54 | /// SQL grammar source. |
| 55 | pub const SQL: &str = include_str!("../syntaxes/sql.json"); |
| 56 | |
| 57 | /// TOML grammar source. |
| 58 | pub const TOML: &str = include_str!("../syntaxes/toml.json"); |
| 59 | |
| 60 | /// TypeScript grammar source. |
| 61 | pub const TYPESCRIPT: &str = include_str!("../syntaxes/typescript.json"); |
| 62 | |
| 63 | /// TSX grammar source. |
| 64 | pub const TSX: &str = include_str!("../syntaxes/tsx.json"); |
| 65 | |
| 66 | /// XML grammar source. |
| 67 | pub const XML: &str = include_str!("../syntaxes/xml.json"); |
| 68 | |
| 69 | /// YAML grammar source. |
| 70 | pub const YAML: &str = include_str!("../syntaxes/yaml.json"); |