如何更改视觉工作室代码工具提示背景颜色



我正在使用Visual Studio Code Editer :https://code.visualstudio.com/for Windows。我正在尝试更改工具提示消息框的背景颜色,但我无法做到。在我的代码下面,但不起作用。有人可以帮助我解决这个问题吗?

设置.json

 {  
 "vscode_custom_css.imports": ["./style.css"],
 "vscode_custom_css.policy": true
 }

风格.css:

      /* suggest-widget size */
      .monaco-editor .suggest-widget.docs-side {
      width: 1000px; 
      }
      .monaco-editor .suggest-widget.docs-side > .details {
      width: 60%;
      max-height: 800px !important; 
      }
      .monaco-editor .suggest-widget.docs-side > .tree {
      width: 30%;
      float: left; 
      }
      /* parameter-hints-widget */
      .editor-widget.parameter-hints-widget.visible {
      max-height: 800px !important; 
      }
      .monaco-editor .parameter-hints-widget > .wrapper {
      max-width: 1000px; 
      }
      /* editor-hover */
      .monaco-editor-hover .monaco-editor-hover-content {
      width: 1000px;
      height:500px;
      background-color: aqua;
      }

有时你自己对.vscodestyles.css的编辑不会覆盖默认值,所以这是我的解决方案(编辑默认 css(:

  • f1 -> 开发人员工具。
  • 拉出工具提示,然后在开发人员工具中选择它。
  • 在开发人员工具中,查看背景色的来源。这可能是默认值。如果是这样,请在开发人员工具中打开它。
  • 复制文件的一部分(子字符串(。有了这个技巧,您将能够搜索它,并在编辑器中直接转到正确的位置。
  • 在带有写入预授权的编辑器中打开它。搜索您复制的子字符串,更改 css,然后保存它。

最好将编辑过的 css 复制到某个地方,这样在更新后,您可以轻松更改默认 css。

最新更新