You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Android Studio中Flutter/Dart变量悬停文档语法高亮问题求助

Android Studio悬停文档窗口语法高亮开启方法

当前你悬停变量时弹出的文档窗口仅显示灰色无语法高亮的内容,可通过以下步骤开启高亮效果:

  • 更新IDE与插件
    确保Android Studio为最新稳定版本,同时在File > Settings > Plugins中检查并更新Java、Kotlin官方插件,旧版本可能缺失该功能支持。

  • 开启文档内语法高亮

    1. 打开File > Settings > Editor > Color Scheme > Language Defaults
    2. 展开Code > Inline documentation,勾选Use syntax highlighting in documentation(部分版本该功能直接集成在配色配置逻辑中)
    3. 调整Code fragment的颜色参数,或直接选择预设配色方案(如Darcula)来继承对应语言的语法高亮样式
  • 针对特定语言细化配置

    • Kotlin:进入File > Settings > Editor > Color Scheme > Kotlin > Documentation,将Code相关项的颜色调整为与主代码高亮一致的样式
    • Java:进入File > Settings > Editor > Color Scheme > Java > Documentation,同理配置Code片段的高亮颜色
  • 清除缓存重启IDE
    若设置后无效果,执行File > Invalidate Caches... > Invalidate and Restart,清除缓存后重启即可生效

内容的提问来源于stack exchange,提问作者Joaquín Varela

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.14 11:22:36