How to change font size in VS Code sidebar?
Querying for fontsize
in User Settings
window yields only settings for:
- editor panes,
- suggest widget,
- markdown preview,
- integrated terminal
as you can see below:
Doing the same for sidebar
gives even poorer results:
Having fonts of different sizes in editor panes and sidebar looks... let's settle with: not too nice. Have I just found the greatest omission of this awesome tool?
Just want to add to the discussion, If you set:
"window.zoomLevel": "your number",
In my case I started with zero, you can use that as sort of a baseline:
"editor.fontSize": 14,
"editor.tabSize": 2,
"terminal.integrated.fontSize": 14,
"window.zoomLevel": 0,
"[Log]": {
"editor.fontSize": 14
},
And then tweaked until I was happy.
E.g. you want to increase the sidebar font size keeping editor font size unchanged: set "window.zoomLevel": 0.5
and "editor.fontSize": 18
. Look at the result. Play with both values to get the result you like.
Hope this helps!
Mihai Chelaru's answer presents a way to do more than just adjust the sidebar's font size. This, however, comes with a price of a bit of fiddling, possibly more than you'd be ready for, if the only thing you were interested in was the simple act of changing the sidebar's font size. So here's a simpler solution.
Just zoom the whole VS Code's UI in or out with CTRL++ or CTRL+- respectively and than adjust font sizes we do have control over in settings.json
file, i.e.:
-
editor.fontSize
, -
editor.suggestFontSize
, -
markdown.preview.fontSize
, terminal.integrated.fontSize
so everything matches. That's it.
This has been a feature request for some time. The short answer is right now there's no VSCode setting that allows you to customize the sidebar font size. There is a hacky workaround solution proposed by @lindesvard in the same issue thread that involves using the Custom CSS and JS Loader extension to load in a custom CSS file that modifies the sidebar styling if you're willing to experiment with it.
To get this working follow the Getting Started section in the extension details, then add URLs to your custom files to the "vscode_custom_css.imports": [""]
array. (Note that on Windows mine looks like the following: "vscode_custom_css.imports": ["file:///C:\\dev\\vscode-styling.css"]
)
Below are before and after adding the CSS mentioned by @PSVapour in a later comment:
Note that this also affects the command palette font.
Apart from @Mihai Chelaru's answer, I found another plugin which helped me dealing with this issue. The name of the plugin is CustomizeUI
.
CustomizeUI
relies on the Monkey Patch Extension
to inject custom javascript in VSCode. Here is the settings I use (in settings.json
) for my Mac:
"customizeUI.stylesheet": {
".explorer-viewlet .mac": "font-size: 1.2em !important; overflow: auto; border-left:none!important",
},
Again, this plugin is meant to do more than just changing the font size of the sidebar. But it has some minor advantages over Custom CSS and JS Loader. Like:
It won't show
Unsupported
on the title-bar or won't show any error message likeYour installation is corrupted
.You do not have to reload settings every time VS Code is updated.