JaredDev Logo

VS Code: Upgrade Your Font with Ligatures

2017-09-10

Love your code

If you are a developer you more than likely spend a LARGE portion of you day staring at code. If you lucky enough to have VS Code as your editor (or a handful of others) then you have the option of using a font that supports ligatures! Sorry Sublime users...

Why?

I know several developers that don't put any thought in to the font they use while coding. Personally I think this is a mistake. Mainly because it takes so little time to find a font that is specifically designed for coding and is something you enjoy looking at all day.

Ligatures add symbols to your code.

// So instead of =>
// you get ⇒

Is it going to be an earth shattering boost to your programming abilities? Probably not...

Could it make your day of coding more enjoyable? I definitely believe so.

Your options

Currently I know of three free and open source fonts that work great!

  • Hasklig - This font is based off of Source Code Pro and happens to be the font that I'm currently using.
  • Fira Code - This font is based off of Fira Mono and is what I used prior to switching to Hasklig
  • Monoid - I couldn't seem to find what this is based off of (if anything)

How to enable

Enabling ligatures is fairly strait forward. Once you have chosen a font to try there are a few settings to change in your VS Code settings. Your settings can be found (in Windows) at File > Preferences > Settings.

There are two settings that you have to change. One is the actual font. The other is the setting that enables ligatures in VS Code.

    "editor.fontFamily": "Hasklig", // "Fira Code" or "Monoid" are also options depending on what you have chosen
    "editor.fontLigatures": true

While the editor.fontFamily could have the original fonts listed in a comma separated list. I find it pointless since you'll have the font installed (hopefully).

That's it!

Now go make something awesome and love what you are looking at!

Did I miss something?

If you know of a free (and ideally open source) font that I missed shoot me a message on Twitter!