How do i setup font ligatures for Visual Studio Code?

依然范特西╮ 提交于 2020-05-15 07:41:52

问题


I am setting up fonts ligatures for my VSCode using these two lines.

"editor.fontFamily": "'Fira Code'",
"editor.fontLigatures": true,

But it still looks the same as before.

I have tried to disable all of my installed extensions but it didn't work.

Here is my full settings:

{
  "workbench.iconTheme": "material-icon-theme",
  "workbench.colorTheme": "Material Theme Darker High Contrast",
  "editor.formatOnSave": true,
  "explorer.confirmDelete": false,
  "editor.suggestSelection": "first",
  "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
  "window.zoomLevel": 0,
  "editor.fontSize": 16, //!=
  "editor.fontFamily": "'Fira Code'",
  "editor.fontLigatures": true,
  "explorer.confirmDragAndDrop": false
}

I want fully functional font ligatures as on this page: How i want it to look. Instead I am getting basic text with some font.


回答1:


It doesn't seem you didn't have the Fira font installed in your PC. Please follow this step if you are using MacOS.

Open terminal and run these commands.

brew tap homebrew/cask-fonts
brew cask install font-fira-code

And try to restart VsCode.

Or if you are on other OS (Windows or Linux) follow this step. https://github.com/tonsky/FiraCode/wiki/Installing

Hopefully, this might be helpful.




回答2:


If you are using a macOS sometimes you will need to restart the computer before the ligatures for Visual Studio Code to take effect.




回答3:


Step #1: Install Fira Code.

Step #2: Set the font in VSCode settings:

"editor.fontFamily": "Fira Code, Menlo, Monaco, 'Courier New', monospace",
"editor.fontLigatures": true,

Step #3: Restart/reload VSCode.

That's about it.



来源:https://stackoverflow.com/questions/56209769/how-do-i-setup-font-ligatures-for-visual-studio-code

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!