tonsky / tonsky/FiraCode

Ligature request: ?.( and ?.[

Open
#922 8 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Clojure
Stars
82k
Forks
3.2k
PR merge metrics
No merged PRs in 30d

Description

TypeScript and ECMAScript have new optional access operators. They look like so:

obj?.id - optional property access
obj?.[expr] - optional element access
func?.(arg) - optional call

See: https://github.com/tc39/proposal-optional-chaining

?.[ and ?.( were chosen as the optional element access and optional call operators respectively because using ?[ and ?( would have led to parsing difficulties for code like so:

obj?[expr].filter(fun):0;
func?(x - 2) + 3 :1

The problem, however, is that these don't look as nice as ?[ or ?(. A ligature could make it look better. I request that ligatures be added to hide the . or otherwise just blend the characters into a better-looking symbol.

Either way, thank you for making a great font!

Related: #215

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the optional-chaining examples and the linked TC39 proposal, then read related issue #215 for prior context. The payload names no source files or tests, so locating the font's ligature definitions is part of the initial investigation. Done means the requested optional element access and optional call sequences render as intentional blended ligatures.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
design
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.