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:
2025-10-14 00:17:17 +02:00
parent ee58b0ac32
commit 99064b6c41
3 changed files with 215 additions and 344 deletions

View File

@@ -1389,7 +1389,7 @@ impl UiSettings {
}
const fn default_syntax_highlighting() -> bool {
false
true
}
const fn default_show_timestamps() -> bool {