Skip to content

Commit

Permalink
syntect additional file type support (#2160)
Browse files Browse the repository at this point in the history
closes #2005

Co-authored-by: MHS <mhs@histolution.com>
  • Loading branch information
martihomssoler and MHS authored Mar 27, 2024
1 parent 5fafe78 commit 3b7b443
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixes
* bump yanked dependency `bumpalo` to fix build from source ([#2087](https://github.com/extrawurst/gitui/issues/2087))
* pin `ratatui` version to fix building without locked `cargo install gitui` ([#2090](https://github.com/extrawurst/gitui/issues/2090))
* add syntax highlighting support for more file types, e.g. Typescript, TOML, etc. [[@martihomssoler](https://github.com/martihomssoler)] ([#2005](https://github.com/extrawurst/gitui/issues/2005))

## [0.25.0] - 2024-02-21

Expand Down
12 changes: 12 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ syntect = { version = "5.2", default-features = false, features = [
"html",
] }
tui-textarea = "0.4.0"
two-face = { version = "0.3.0", default-features = false }
unicode-segmentation = "1.11"
unicode-truncate = "0.2"
unicode-width = "0.1"
Expand All @@ -71,8 +72,8 @@ maintenance = { status = "actively-developed" }
default = ["ghemoji", "regex-fancy", "trace-libgit", "vendor-openssl"]
ghemoji = ["gh-emoji"]
# regex-* features are mutually exclusive.
regex-fancy = ["syntect/regex-fancy"]
regex-onig = ["syntect/regex-onig"]
regex-fancy = ["syntect/regex-fancy", "two-face/syntect-fancy"]
regex-onig = ["syntect/regex-onig", "two-face/syntect-onig"]
timing = ["scopetime/enabled"]
trace-libgit = ["asyncgit/trace-libgit"]
vendor-openssl = ["asyncgit/vendor-openssl"]
Expand Down
2 changes: 1 addition & 1 deletion src/ui/syntax_text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub struct SyntaxText {
}

static SYNTAX_SET: Lazy<SyntaxSet> =
Lazy::new(SyntaxSet::load_defaults_nonewlines);
Lazy::new(two_face::syntax::extra_no_newlines);
static THEME_SET: Lazy<ThemeSet> = Lazy::new(ThemeSet::load_defaults);

pub struct AsyncProgressBuffer {
Expand Down

0 comments on commit 3b7b443

Please sign in to comment.