Skip to content

macos zsh 请求抛弃青蓝色的高亮显示 || macos zsh request to discard cyan highlighting #2319

@SoilSoi1

Description

@SoilSoi1

What feature would you like to see?

问题描述

当前 theme = "dark" / "light" 只改变了 UI 框架配色(状态栏、Diff 背景、任务浏览器等),代码高亮主题是完全固定的一套,不随主题切换而变化。

这导致在浅色终端或特定视觉偏好下,默认的 cyan / bright_cyan 代码高亮非常刺眼且难以阅读。

临时 workaround

为了换掉青色,我不得不直接修改源码:

文件 修改内容
kimi_cli/utils/rich/syntax.py KIMI_ANSI_THEME 中所有 cyan / bright_cyan 替换为其他颜色(如 yellow / bright_yellow
kimi_cli/utils/rich/markdown.py _FALLBACK_STYLES 中的 markdown.codemarkdown.code_blockmarkdown.link_url 的 cyan 替换
kimi_cli/ui/shell/console.py NEUTRAL_MARKDOWN_THEME 中的 markdown.link_url 的 cyan 替换

希望官方提供一种无需改源码的方式来自定义代码高亮配色

Additional information

No response


What feature would you like to see?

Problem description

Currently theme = "dark" / "light" only changes the UI frame color (status bar, Diff background, task browser, etc.). The code highlighting theme is a completely fixed set and does not change with theme switching.

This results in the default cyan / bright_cyan code highlighting being very harsh and difficult to read in light-colored terminals or under certain visual preferences.

Temporary workaround

In order to replace the cyan color, I had to modify the source code directly:

File Modify content
kimi_cli/utils/rich/syntax.py Replace all cyan / bright_cyan in KIMI_ANSI_THEME with other colors (such as yellow / bright_yellow)
kimi_cli/utils/rich/markdown.py Replace the cyan of markdown.code, markdown.code_block, markdown.link_url in _FALLBACK_STYLES
kimi_cli/ui/shell/console.py Replace the cyan of markdown.link_url in NEUTRAL_MARKDOWN_THEME

I hope the official can provide a way to customize the code highlight color without changing the source code.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions