VS Code - 描述弹出窗口的大小
VS Code - size of description popup
我正在为 VS Code 创建一个带有长描述的片段。
我注意到 VS Code 中的描述弹出窗口 window 有一个滚动条,但如果我可以放大 window?可能吗?
不,目前不可能。有时文本甚至会换行在这样的弹出窗口 window 中,这使得阅读变得困难。当然是需要改进的地方。
这是一个例子:
现在可以使用 Custom CSS and JS Loader extension。
1。安装扩展
Custom CSS and JS Loader extension
2。设置权限
- macOS
- VS 代码:
sudo chown -R $(whoami) /Applications/Visual Studio Code.app/Contents/MacOS/Electron
- VS 代码内部人士:
sudo chown -R $(whoami) /Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Electron
- Linux:
sudo chown -R $(whoami) /usr/share/code
3。创建 CSS 覆盖文件
touch ~/.vscode-custom.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 {
max-width: 1000px;
}
将CSS文件路径应用到settings.json
{
"vscode_custom_css.imports": ["file:///Users/yourusername/.vscode-custom.css"],
"vscode_custom_css.policy": true
}
4。重启VSCode
- 重启VSCode
- 忽略“VSCode is corrupt errors_
- 你可以选择永远压制这些
- 运行命令"Reload Custom CSS and JS"
VSCode 1.51(2020 年 10 月)应该添加(部分)该功能:
Resizable suggestions
This milestone, we've made several improvements to the suggestions UI. First and foremost: it can now be resized! Drag the sides or corners to resize the control.
Theme: GitHub Light, Font: FiraCode
The size of the suggestions list will be saved and restored across sessions.
The size of the details pane is only saved per session, since the size tends to be more variable.
Also, the editor.suggest.maxVisibleSuggestions
setting has become obsolete.
如 Jan M. in 所述,这只允许调整 建议 window 的大小,而不是弹出窗口 window.
允许调整弹出窗口大小的功能 window 尚未实现:
microsoft/vscode
issue 14165:“功能请求:配置工具提示最大宽度”。
Customize UI + Monkey Patch 扩展绝对有可能。
安装它们,然后将以下内容添加到您的 settings.json:
"customizeUI.stylesheet": {".monaco-hover-content, .hover-contents span, .parameter-hints-widget div.code, .parameter-hints-widget div.docs": "font-size: 12px !important"}
不要忘记重新加载 window 以应用更改!
VS Code 对我来说很有魅力1.63.2
我正在为 VS Code 创建一个带有长描述的片段。 我注意到 VS Code 中的描述弹出窗口 window 有一个滚动条,但如果我可以放大 window?可能吗?
不,目前不可能。有时文本甚至会换行在这样的弹出窗口 window 中,这使得阅读变得困难。当然是需要改进的地方。
这是一个例子:
现在可以使用 Custom CSS and JS Loader extension。
1。安装扩展
Custom CSS and JS Loader extension
2。设置权限
- macOS
- VS 代码:
sudo chown -R $(whoami) /Applications/Visual Studio Code.app/Contents/MacOS/Electron
- VS 代码内部人士:
sudo chown -R $(whoami) /Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Electron
- VS 代码:
- Linux:
sudo chown -R $(whoami) /usr/share/code
3。创建 CSS 覆盖文件
touch ~/.vscode-custom.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 {
max-width: 1000px;
}
将CSS文件路径应用到settings.json
{
"vscode_custom_css.imports": ["file:///Users/yourusername/.vscode-custom.css"],
"vscode_custom_css.policy": true
}
4。重启VSCode
- 重启VSCode
- 忽略“VSCode is corrupt errors_
- 你可以选择永远压制这些
- 运行命令"Reload Custom CSS and JS"
VSCode 1.51(2020 年 10 月)应该添加(部分)该功能:
Resizable suggestions
This milestone, we've made several improvements to the suggestions UI. First and foremost: it can now be resized! Drag the sides or corners to resize the control.
Theme: GitHub Light, Font: FiraCode
The size of the suggestions list will be saved and restored across sessions.
The size of the details pane is only saved per session, since the size tends to be more variable.
Also, theeditor.suggest.maxVisibleSuggestions
setting has become obsolete.
如 Jan M. in
允许调整弹出窗口大小的功能 window 尚未实现:
microsoft/vscode
issue 14165:“功能请求:配置工具提示最大宽度”。
Customize UI + Monkey Patch 扩展绝对有可能。
安装它们,然后将以下内容添加到您的 settings.json:
"customizeUI.stylesheet": {".monaco-hover-content, .hover-contents span, .parameter-hints-widget div.code, .parameter-hints-widget div.docs": "font-size: 12px !important"}
不要忘记重新加载 window 以应用更改!
VS Code 对我来说很有魅力1.63.2