feat(tui): enable syntax highlighting by default and refactor highlighting logic
- Set `default_syntax_highlighting` to true in core config. - Added language‑aware syntax selector (`select_syntax_for_language`) and highlighter builder (`build_highlighter_for_language`) with unit test. - Integrated new highlight module into `ChatApp`, using `UnicodeSegmentation` for proper grapheme handling. - Simplified `should_highlight_code` to always return true and removed extended‑color detection logic. - Reworked code rendering to use `inline_code_spans_from_text` and `wrap_highlight_segments` for accurate line wrapping and styling. - Cleaned up removed legacy keyword/comment parsing and extended‑color detection code.
This commit is contained in:
@@ -1389,7 +1389,7 @@ impl UiSettings {
|
||||
}
|
||||
|
||||
const fn default_syntax_highlighting() -> bool {
|
||||
false
|
||||
true
|
||||
}
|
||||
|
||||
const fn default_show_timestamps() -> bool {
|
||||
|
||||
Reference in New Issue
Block a user